我正在尝试以横向模式在iPad上创建国家/地区列表,但是每次在ios 8中显示问题,但在ios 7中都可以正常工作。请帮助我解决此问题,使其在横向模式中起作用。
In AbstractActionSheetPicker.m
in function - (void)configureAndPresentPopoverForView:(UIView *)aView
add preferredContentSize. the function looks like this after this and will work in iOS8
- (void)configureAndPresentPopoverForView:(UIView *)aView {
UIViewController *viewController = [[UIViewController alloc] initWithNibName:nil bundle:nil];
viewController.view = aView;
//Bugfix Landscape Mode iOS8
if([viewController respondsToSelector:@selector(preferredContentSize)]){
viewController.preferredContentSize = CGSizeMake(self.viewSize.width, 260);
}
viewController.contentSizeForViewInPopover = viewController.view.frame.size;
_popOverController = [[UIPopoverController alloc] initWithContentViewController:viewController];
[self presentPopover:_popOverController];
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.