View 跳转到controll

//按钮的响应方法

-(void)tap3Action:(UITapGestureRecognizer *)tap{

NSLog(@"点击了中间");

//跳转的页面初始化

clckViewController  *cc=[[clckViewController alloc]init];

//调用下面的方法跳转

// [[self viewController]presentViewController:cc animated:YES completion:nil];

[[self viewController].navigationController pushViewController:cc animated:YES];

}

//方法

-(UIViewController *)viewController{

for (UIView *next=[self superview]; next; next=next.superview) {

UIResponder *nexrResponder=[next nextResponder];

if ([nexrResponder isKindOfClass:[UIViewController class]]) {

return (UIViewController *)nexrResponder;

}

}

return nil;

}

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • { 11、核心动画 需要签协议,但是系统帮签好 一、CABasicAnimation 1、创建基础动画对象 CAB...
    CYC666阅读 5,481评论 2 4
  • 哦吼吼,又研究了几天,把FMDB这个封装好的数据库搞定了,写了个简单的例子,基于FMDB的添删改查操作,界面很一般...
    lichengjin阅读 3,630评论 0 0
  • 作者唯一QQ:228544117。。。。。 =========后面的都要新建一个文章 AppDelegate.h ...
    CC_iOS阅读 4,688评论 0 0
  • VideoFileRenderer实现了VideoRenderer的Callbacks,可以回调到产生的Frame...
    关玮琳linSir阅读 8,949评论 0 7
  • 电商已经成了标配,逐渐也感觉到风口已过,心中有些许不舍当初的青春年华,那么今天就从 电商卖家、商品、渠道、销量、困...
    踩单车的悟净阅读 3,452评论 0 1