我想用UIBarButtonItem动作显示popoverview,但是我不能在情节提要中添加popover segue。因为我以编程方式添加了UIBarButtonItem。
感谢您的答复。
@property (nonatomic, strong) UIPopoverController *yourPopOverController;
在你的行动方法中。
UIBarButtonItem *yourButton = (UIBarButtonItem *)sender;
YourViewController *yourViewControllerObject = [[YourViewController alloc]init];
yourPopOverController = [[UIPopoverController alloc] initWithContentViewController:yourViewControllerObject];
yourPopOverController.delegate = self;
[yourPopOverController presentPopoverFromBarButtonItem:yourButton permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句