2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > controll层跳转页面_View 跳转到controll

controll层跳转页面_View 跳转到controll

时间:2024-01-21 15:05:40

相关推荐

controll层跳转页面_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;

}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。