1

In iOS I am displaying some content within a UIView in a UIPopover. Sometimes the popover resizes when the keyboard is shown. Is there a specific event for the UIView that I can use to resize the subviews etc? If not, what is the best way to detect the resize event?

Daniel
  • 23,129
  • 12
  • 109
  • 154
whatdoesitallmean
  • 1,586
  • 3
  • 18
  • 40

1 Answers1

0

You'll probably have to detect this in a delegate method of what ever calls up the keyboard, for example if it's a UITextField something like - (void)textFieldDidBeginEditing:(UITextField *)textField

Another option as described in this post is to use a UIKeyboardListener to list for notifications about wether or not the keyboard is visible.

UIPopoverController unfortunately only has two delegate methods and they pertain to the pop over dismissing.

 - (void)popoverControllerDidDismissPopover:(UIPopoverController
   *)popoverController
 - (BOOL)popoverControllerShouldDismissPopover:(UIPopoverController *)popoverController
Community
  • 1
  • 1
Mick MacCallum
  • 129,200
  • 40
  • 280
  • 281