Closed antonmartinsson closed 6 years ago
@antonmedstorta Did you figure this out since you closed the issue?
I did. Maybe I should've commented and said so, sorry. The solution was quite simple in the end, really. As I had previously created the textfield it was linked to the ViewController as a UITextField Outlet, and not as a SkyFloatingLabelTextField. After I re-linked it from the Interface Builder and got all my files in order it found the definition and I was able to change the titleLabel property.
Thanks for checking in!
Hi,
I was looking for a way to keep placeholder text centered when it's floating above the field (during user input). I came across this discussion (https://github.com/Skyscanner/SkyFloatingLabelTextField/issues/68) and thought that would solve my problem. Unfortunately, this was not the case. When I try to access "titleLabel" and adjust its textAlignment property, XCode tells me that "Value of type UITextField has no member titleLabel".
The code block is currently located in ViewDidLoad, but I've also tried putting it in viewDidAppear, with no luck. It seems I can't access any of the unique properties tied to the SkyFloatingLabelTextField, as I can't even seem to programmatically create one (works via Interface Builder though). Does anybody have an idea of what am I doing wrong?