On Tue, May 31, 2011 at 3:49 PM, Conrad Shultz <con...@synthetiqsolutions.com> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 5/31/11 12:23 PM, Jeffrey Walton wrote: >> Hi All, >> >> I have a view that accepts input using UIKeyInput. The VC's >> viewWillAppear: calls [myHiddenView becomeFirstResponder] which shows >> the alphanumeric keyboard. I get input as expected through insertText: >> and deleteBackwards:. >> >> How does one change the keyboard type to UIKeyboardTypeNumberPad? I've >> tried conforming to UITextInputTraits in my custom view, but the >> keyboard does not appear to reach back to my view for the trait. Is >> there anything special when a protocol only includes properties? Or >> perhaps I have missed another [important] detail? > > Can you show code? I ask because I just implemented a minimal example > that I believe does what you are asking, with nothing fancy. I did not > implement the backing store for UIKeyInput, but I don't see that that > should matter here. > > In a UIView subclass (declared with <UITextInputTraits, UIKeyInput>) I > implemented: > > [SNIP] > > And, as expected, when I tapped the UIView (in simulator), the numeric > keypad appeared. > > This sounds like what you did, though...? The only thing I could think > of is that your view controller is interfering, but the view comes > before its controller in the responder chain, so it's not clear how this > would happen (barring some very unorthodox implementation). Thanks Conrad. We had essentially the same code. `rm -rf build/` fixed it.
Jeff _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com