我正在寻找一种使用淡入/淡出动画在我的应用程序中显示和隐藏弹出窗口的方法。有可能吗?
答案 0 :(得分:0)
PopOverDesignController *objPopOverDesignController = [[PopOverDesignController alloc] initWithNibName:@"PopOverDesignController" bundle:nil];
UIPopoverController *popController = [[UIPopoverController alloc] initWithContentViewController:objPopOverDesignController];
popController.delegate = self;
popController.popoverContentSize = objCategoriesViewController.view.frame.size;
[popController presentPopoverFromRect:CGRectMake(130,970,100,100)
inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
[popController dismissPopoverAnimated:YES];
答案 1 :(得分:0)
如果您希望淡入/淡出弹出窗口,则需要使用 modalTransitionStyle 属性
将控制器中的模态过渡样式设置为CrossDissolveSwift
vc.modalTransitionStyle = UIModalTransitionStyle.CrossDissolve
目标c
vc.modalTransitionStyle.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
vc 是您要呈现的视图控制器