Westley
Westley

Reputation: 1153

Strange issue with numeric keyboard losing custom UIButton when it finishes displaying

As hacky as it seems, I am using this method to add a done button to my numeric keyboard:

UIKeyboardTypeNumberPad without a done button

I toggle the slow animation and it looks like this while it is still animating and not quite done:

enter image description here

But then, when it finishes loading, it looks like this!

enter image description here

The UIButton I am adding just disappears! I subscribed to UIKeyboardDidShowNotification and filter through the subviews and can see that by the time the notification is fired, there is no longer a UIButton as a subview of the keyboard.

I tried turning off ARC for the file but still no luck.

Any ideas as to what might be causing the UIButton to vanish? The button is a STRONG property btw.

Thanks

Upvotes: 0

Views: 188

Answers (1)

TonyMkenu
TonyMkenu

Reputation: 7667

please, can you check again, maybe you have omitted something.. https://dl.dropbox.com/u/19438780/KeyboardExtension.zip

Another tutorial/example for iOS6: http://ofanyuse.wordpress.com/2012/11/09/an-elegant-solution-to-adding-a-uibutton-to-the-numberpad/

Upvotes: 2

Related Questions