I have been told that to access a UITextField in the setup i have with my app, i have to use a subView whatever this is (in a noob at objectivec) and i was given this
[subview isKindOfClass:[UITextField class]]
Where do i put this? And how can i use it to set the value of my UITextField? 😀
Thanks!
Update: I want to set the value of my textfield, in the function that is called after my URLScheme – the scheme bit works as i have alerted out the url.. this is cool, now i need to set a textfield with a string?
Iterating through subviews and choosing based on type is not generally considered good design practice. You should reconsider how this is structured to have explicit access to the
UITextFieldyou want to access. Doing this with Apple’s private classes in particular will deny you access to the App Store. At any rate, here’s how you’d do what you want: