Take the 2-minute tour ×

I have a view controller that manages a four digit PIN pad. This controller is used to access my app.

However, I would like to use the same PIN pad when changing the PIN. The controller to change the PIN is a MT.DialogViewController with one section and one row, namely a ViewElement. That ViewElement holds the view of the PIN pad controller. This kind of works, but ViewWillAppear etc aren't called reliably. I have also tried to use UIViewController containment by calling (in the MT.Dialog c'tor) addChildViewController, then add the ViewElement and then call didMoveToParentViewController. Still, I'm getting problems upon rotation and the VieWill/Did*() methods aren't called. Is there a solution for this (either clean or dirty, I don't care)?

share|improve this question

1 Answer 1

Can you re-factor the PIN pad from a ViewController to a UIView (and then stick the UIView containing the PIN pad back into the UIViewController)?

Doing so should let you put the PIN pad UIView inside a ViewElement, which I suspect will result in improved rendering on Orientation changes and consistent ViewDid/Will method calls.

share|improve this answer
Not an option. The controller does lots of, well, controlling. –  Krumelur Nov 29 '12 at 22:08

Your Answer


