iOS中之前的PopoverView实现下拉菜单,PopoverView已经被废弃,现在用什么写
你说的应该是 UIPopoverController 吧,如果是的话,你可以用下面的方案替换 UIPopoverController:
1、present 一个 VC 时,用 UIModalPresentationPopover 这种样式,代码大致如下:
UIViewController *modalVC = [[UIViewController alloc] init];
modalVC.modalPresentationStyle = UIModalPresentationPopover;
modalVC.popoverPresentationController.sourceView = self.view;
[self presentViewController:modalVC animated:YES completion:nil];
2、使用 UIPopoverPresentationController。
希望对你有用。