Take the 2-minute tour ×

i am creating a dropdown button in my app. Like a pop-up control which is available in webapps. so when i click on a button, a new UIView containing a UIPickerView appears. i user beginanimations and commitanimations for dispalying and hiding the UIView. the new uiview is half the size of the scrollview.

I want that whenever the new uiview appears, the size of the scrollview should alter so that the i can scroll through the entire view. something like, when a keyboard appears, we reassign the size of scrollview, so that we can scroll entire view.

So how will i know, when the uiview appears. Is there a notification for beginanimations and commitanimations like for keyboard (UIKeyboardDidHideNotification)

thnx in advance.

share|improve this question

1 Answer 1

if the subview you create and show have a viewController, -(void)viewWillAppear method of the viewController will be called on every appearance of that view.

In that method, you can somehow get the superview (for example calling nextResponder method) and resize the superview according to your needs.

Hope that helps.

share|improve this answer

Your Answer


