views:

35

answers:

1

hello everybody. 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 pickerview 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.

A: 

Hi, 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.

Behlül