UIPresentationController
来源:互联网 发布:寄生虫推广软件 编辑:程序博客网 时间:2024/05/29 04:14
-(void)clickAdrress:(UIButton *)sender{
NSLog(@"点击地址弹出控制器");
_addressPopone = [addressPopViewControllernew];
_addressPopone.view.backgroundColor = [UIColorclearColor];
_addressPopone.preferredContentSize =CGSizeMake(self.view.frame.size.width-10-10,self.view.frame.size.height/2);
_addressPopone.modalPresentationStyle =UIModalPresentationPopover;
_addressPopone.popoverPresentationController.permittedArrowDirections = UIPopoverArrowDirectionUp;
_redView = [[UIViewalloc]init];
_redView.frame =_addressPopone.view.frame;
_redView.backgroundColor = [UIColorclearColor];
UIButton *btn = [[UIButtonalloc]initWithFrame:CGRectMake(40,40, 40, 40)];
btn.backgroundColor = [UIColorblueColor];
[btn addTarget:selfaction:@selector(clickBtn:)forControlEvents:UIControlEventTouchUpInside];
[_redViewaddSubview:btn];
[_addressPopone.viewaddSubview:_redView];
self.popover =_addressPopone.popoverPresentationController;//初始化一个
self.popover.delegate =self;
self.popover.sourceView =self.addressBtn;
self.popover.sourceRect =self.addressBtn.bounds;
//self.popover.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.7];
self.popover.backgroundColor = [UIColorclearColor];
[selfpresentViewController:_addressPoponeanimated:YEScompletion:nil];
}
-(UIModalPresentationStyle)adaptivePresentationStyleForPresentationController:(UIPresentationController *)controller{
returnUIModalPresentationNone;
}
-(void)clickBtn:(UIButton *)sender{
[selfdismissViewControllerAnimated:YEScompletion:nil];
//
addressPopViewController *addressPop = [[addressPopViewControlleralloc]init];
addressPop.modalPresentationStyle =UIModalPresentationFormSheet;
[selfpresentViewController:addressPopanimated:YEScompletion:nil];
}
-(void)popoverPresentationControllerDidDismissPopover:(UIPopoverPresentationController *)popoverPresentationController{
[selfdismissViewControllerAnimated:YEScompletion:nil];
}
- UIPresentationController
- UIPresentationController
- UIPresentationController
- UIPresentationController 注意事项
- UIPresentationController简介
- 自定义UIPresentationController
- iOS8的UIPresentationController
- UIPresentationController自定义转场动画
- UIPresentationController 教程:入门
- iOS UIPresentationController实现弹出视图
- ios8中 利用UIPresentationController 自定义转场
- iOS8新特性 UIPresentationController(一)
- iOS8新特性 UIPresentationController(一) popover、alert、action sheet与search的新特性
- iOS8新特性 UIPresentationController(一) popover、alert、action sheet与search的新特性
- iOS关于UIPresentationController 在视图上面创建一个UIViewController并改变大小
- UIPresentationController 蒙版阴影,看我就足够了(特简单)
- 构造器与方法区别
- 安卓中对库等依赖的详解
- TestNG测试报告美化
- matplot绘制bar图--python绘图
- JNA -->JNI的终结者(一)
- UIPresentationController
- 欢迎使用CSDN-markdown编辑器
- logstash 操作redis
- LVS-DR负载均衡简易配置
- addEventListener()与removeEventListener()
- cmpp2.0如何实现网关短信发送
- 1098. Insertion or Heap Sort (25)-PAT甲级真题(堆排序)
- Xcode_7 iOS_9 日期选择器 Objective-C (7)
- 右侧视角的二叉树