ios 在View里push或者presentViewController
来源:互联网 发布:传奇网络加速器免费版 编辑:程序博客网 时间:2024/05/29 07:36
通常使用self.navgationController是在Viewcontroller里面调用的,但是有的时候需要在view上也需要调用push或者present推出新的页面的方法,那么可以使用以下三种。
1、block方法。
2、代理方法。
3、获取该View所在的Viewcontroller。【这个也是我要说的方法】
//获取View所在的Viewcontroller方法- (UIViewController *)viewController { for (UIView* next = [self superview]; next; next = next.superview) { UIResponder *nextResponder = [next nextResponder]; if ([nextResponder isKindOfClass:[UIViewController class]]) { return (UIViewController *)nextResponder; } } return nil;}//使用方法:[[self viewController].navigationController pushViewController:[yourViewController new] animated:YES];
0 0
- ios 在View里push或者presentViewController
- IOS在View上面调用push或者present方法。
- IOS实现翻转一个View显示presentViewController
- iOS点击空白处关闭presentViewController出来的view
- Cell内或者自定义View内push
- presentViewController view循环动画
- IOS 使用相机或者在相册里获取图片
- iOS控制器在push或者pop时导航栏出现黑块的解决办法
- iOS控制器在push或者pop时导航栏出现黑块的解决办法
- iOS——presentViewController
- react-native ios push 本地view
- iOS presentViewController背景色透明
- iOS presentViewController方式跳转延迟
- iOS presentViewController弹…
- iOS presentViewController 页面透明设置
- IOS开发,在控制器或者其他View中使用xib文件
- 解决 iOS ViewController Push或者Pop 时的黑影
- presentViewController
- 断点
- angular.bind
- FinalDb sqlinfo is null问题
- 使用ioc来创建对象有三种方式
- 解决Android中TextView首行缩进的问题
- ios 在View里push或者presentViewController
- Java zip压缩
- Centos下使用scp传输文件
- 平衡二叉树
- JavaScript笔记
- 数据结构与算法之穷举法
- java获取机器名及所有网卡IP
- <a>标签中onclick和href
- Nginx 反向代理Tomcat