UIPopover arrow direction not updated after keyboard appearing [iPad, iOS7]
| Originator: | tomasz.mlocek | ||
| Number: | rdar://15422861 | Date Originated: | 08-Nov-2013 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | iOS 7.0.3 |
| Classification: | UI/Usability | Reproducible: | Always |
Summary:
When popover control is shown using presentPopoverFromRect:inView:permittedArrowDirections:animated: method with UIPopoverArrowDirectionAny flag it seems that in some cases arrow direction is not updated correctly in respect to popover reposition.
Steps to Reproduce:
1. Import 'TestPopover' project which can be found in attachments (source snippet below description)
2. Launch application in landscape mode on iPad
3. Click on 'Button', popover control is shown on the left in respect to button - ok.
4. Click on text field embedded into popover content - keyboard appears
5. Popover is repositioned to the top of the button (ok), but popover's arrow is not pointing to the button anymore :( Moreover recently added (iOS7) popoverController:willRepositionPopoverToRect:inView: delegate's method is not invoked when keyboard appearance enforces popover's repositioning, but it should be raised another issue for this.
Expected Results:
Popover's arrow position should be updated, and it should still be pointing to the anchor button.
Version:
iOS 7.0.3
Notes:
********** source example ***********
@interface ViewController ()
@end
@implementation ViewController {
UIViewController *textFieldController;
UIPopoverController *popover;
}
- (IBAction)onTouchDown:(id)sender {
textFieldController = [[UIViewController alloc] init];
textFieldController.view = [[UITextField alloc] init];
//textFieldController.view.frame = CGRectMake(0, 0, 200, 400);
popover = [[UIPopoverController alloc] initWithContentViewController:textFieldController];
popover.popoverContentSize = CGSizeMake(100, 400);
[popover presentPopoverFromRect:self.button.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
popover.delegate = self;
}
#pragma mark - UIPopoverControllerDelegate methods
- (void)popoverController:(UIPopoverController *)popoverController willRepositionPopoverToRect:(inout CGRect *)rect inView:(inout UIView **)view {
NSLog(@"%@", @"willRepositionPopoverToRect");
}
@end
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!