I'm using a custom presentation controller to make something similar to UIAlertView. I want it to move up when the keyboard shows. In the UIKeyboardWillShowNotification handler, I'm grabbing the new keyboard frame, storing it in a property, and then calling:
self.presentedView.frame = [wself frameOfPresentedViewInContainerView];
In my implementation of -frameOfPresentedViewInContainerView, I take the current keyboard height into account.
This works perfectly, but it feels a little dirty to be modifying the frame of self.presentedView directly. I tried triggering layout on the container view with various permutations of setNeedsLayout and layoutIfNeeded, but nothing causes the presented view to move other than just setting its frame directly.
Is there a better way to do this than to just change the frame myself?