【发布时间】:2015-11-14 11:48:08
【问题描述】:
在我的 iOS8+ 项目中,我使用 UIPopoverPresentationController 呈现 UIViewController:
vc.modalPresentationStyle = UIModalPresentationPopover;
vc.popoverPresentationController.delegate = self;
vc.popoverPresentationController.sourceView = self.someView.superview;
vc.popoverPresentationController.sourceRect = self.someView.frame;
vc.popoverPresentationController.backgroundColor = [UIColor clearColor];
vc.popoverPresentationController.permittedArrowDirections = UIPopoverArrowDirectionUp | UIPopoverArrowDirectionDown;
vc.preferredContentSize = CGSizeMake(200, 500);
(也实现了委托方法强制作为popover)
-(UIModalPresentationStyle)adaptivePresentationStyleForPresentationController:(UIPresentationController *)controller
{
return UIModalPresentationNone;
}
目前,它会立即出现在呈现的 UIViewController 上(并随着淡出而消失)。谁能指导我自定义此演示文稿以便让它淡入淡出?
【问题讨论】:
-
你可以试试github.com/AugustRush/ARTransitionAnimator UIViewController 过渡动画
-
@Madanupta 谢谢。会的。
标签: ios uipopovercontroller uipopover