ios tableViewCell 跳转获取 UIViewController
2015-05-27 16:25
274 查看
#pragma remark -tableviewCell 上级控制器 (可以放到公共方法类中 方便调用)
+(UIViewController *)viewController:(UIView *)view
{
UIResponder *next = [viewnextResponder];
do {
if ([nextisKindOfClass:[UIViewControllerclass]])
{
return (UIViewController *)next;
}
next = [next nextResponder];
} while (next !=nil);
returnnil;
}
//cell里面直接调用viewController 获取控制器
PictureViewController *pic =[[PictureViewControlleralloc]
init];
// 对模式对话框 弹出view
[[UIUtilsviewController:self]presentViewController:pic
animated:YES
completion:nil];
//或者 push
[[UIUtilsviewController:self].navigationControllerpushViewController:pic
animated:YES]
+(UIViewController *)viewController:(UIView *)view
{
UIResponder *next = [viewnextResponder];
do {
if ([nextisKindOfClass:[UIViewControllerclass]])
{
return (UIViewController *)next;
}
next = [next nextResponder];
} while (next !=nil);
returnnil;
}
//cell里面直接调用viewController 获取控制器
PictureViewController *pic =[[PictureViewControlleralloc]
init];
// 对模式对话框 弹出view
[[UIUtilsviewController:self]presentViewController:pic
animated:YES
completion:nil];
//或者 push
[[UIUtilsviewController:self].navigationControllerpushViewController:pic
animated:YES]
相关文章推荐
- iOS开发之----去除tableViewCell分割线的左边间隙,将分割线填满
- ios UITableView 获取点击cell对象
- iOS tableViewCell plane格式下,接近section边缘不显示分割线却被复用解决办法 分类: ios技术 2015-06-12 16:19 136人阅读 评论(0) 收藏
- ios与js交互,获取webview完整url,title,获取元素并赋值跳转
- iOS-UITableView-处理cell上按钮事件(弹出警示框,页面跳转等)
- iOS 获取appStore的链接地址,从app中跳转 appStore中应用
- IOS PDF 获取目录 及跳转 DEMO
- iOS TextView在TableviewCell中自动增加高度
- iOS 获取自定义cell上按钮所对应cell的indexPath.row的方法
- iOS tableViewCell plane格式下,接近section边缘不显示分割线却被复用解决办法
- iOS 获取当前点击的cell相对于self.view的位置
- iOS-TableViewCell.xib创建多个样式的Cell
- ios开发之 获取APP版本号/跳转APPStore(下载页/评论页)
- iOS UITableView之cellForRowAtIndexPath和indexpathForCell分别获取指定cell和indexpath
- iOS学习-tableViewCell初始化,InterfaceBuilder和代码实现的差异
- 点击屏幕获取对应tableviewcell
- 【iOS学习】九、数据获取与界面跳转传值
- iOS在自定义视图(常用于自定义cell)中获取导航控制器上面的当前的控制器对象
- IOS TableViewCell分割线设置和隐藏多余cell
- IOS 使用presentViewController方法跳转的navigationController如何获取及视图层级关系