I am creating an app with core graphics that needs to take text input and place characters at specific pixel offsets.
Do I have to subclass UITextField or something and re-invent the wheel (redefine it to be a more abstract text entry widget - really I only need the events a UITextField generates) or can I somehow show the keyboard, receive it's events and dismiss it myself!
Thanks!
You could instantiate a UITextField with a frame that makes it invisible (off the "screen" to the left or the top for instance, and make sure the parent view is set to clip child views), and then call [myTextField becomeFirstResponder]
to show the keyboard. Make your view controller a UITextFieldDelegate and follow all changes to the text that way, echoing the string using your custom drawing code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With