IOS 页面跳转问题:点击按钮页面不跳转
问题:每次运行模拟器进入(登录页面->我的页面->注销)没有问题,但是注销后回到登录页面,再点击登录就没有反应了。
AppDelegate:
LoginViewController *loginViewController = [[LoginViewController alloc]init];
if ([loginViewController isKindOfClass:[LoginViewController class]]) {_navigationController = [[UINavigationController alloc] initWithRootViewController:loginViewController];
}self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = _navigationController;
[self.window makeKeyAndVisible];
我的页面中的注销:
LoginViewController *logView = [[LoginViewController alloc]init];
AppDelegate *myDelegate = [[UIApplication sharedApplication] delegate];
myDelegate.window.rootViewController = logView;
点击按钮进入PreGWController 再登录:
代码点击后没反应:
if (_pregw==nil) {
_pregw = [[PreGWController alloc]initWithNibName:nil bundle:nil];
}
AppDelegate *myDelegate = [[UIApplication sharedApplication] delegate];
[myDelegate.navigationController pushViewController:_pregw animated:YES];
code改为:跳转正常了if (_pregw==nil) {_pregw = [[PreGWController alloc]initWithNibName:nil bundle:nil];}//创建根试图控制器
UINavigationController* navi = [[UINavigationController alloc ] init];//创建导航控制器
AppDelegate *myDelegate = [[UIApplication sharedApplication] delegate];
[navi pushViewController:_pregw animated:YES];//入栈myDelegate.window.rootViewController = navi;//
[myDelegate.window makeKeyAndVisible];
参考:http://www.cnblogs.com/496668219long/p/4472195.html
IOS 页面跳转问题:点击按钮页面不跳转相关推荐
- layui让当前页面刷新_layui点击按钮页面会自动刷新的解决方案
问题: Title 输入框 test layui.use(['laytpl','jquery','layer','form'],function () { var laytpl = layui.lay ...
- 使用jQuery实现点击按钮 页面下滑一定距离
使用jQuery实现 点击按钮 页面下滑一定距离 在页面中添加 <script>$(".anniu").click(function(){var h=$(window) ...
- 点击按钮页面滚动到对应位置(锚点)
前言 回到顶部,相信大家都不陌生吧,这个功能可谓是随处可见,也是作为一名前端开发工程师手到擒来的一个功能点.但前几天刚刚好有一个类似于回到顶部(锚点)的功能点把我卡住了,就是点击锚点按钮页面滚到对应位 ...
- 安卓/Android 点击按钮/返回键跳转返回到 手机系统桌面
之前也用到过这段代码,只是未理解其实现原理!个人理解,不当之处还望指正. 跳转到桌面功能 涉及到Activity跳转到HOME,即需要运用Intent对象. Intent对象是Activity与其他A ...
- 做Vue项目时点击按钮页面会刷新问题
起因:写项目时 用原生写了一个按钮,点击页面会刷新 原因:原生按钮默认的type为submit,具有提交表单的功能,当在不是IE浏览器的环境下点击时就会发生页面刷新问题. 解决办法: 1.按钮标签中设 ...
- html 弹窗之后页面变灰色,html点击按钮弹出窗口背景灰掉,点击背景变白退出点击退出也可以...
html点击按钮弹出窗口背景灰掉,点击背景变白退出点击退出也可以 2011-06-10 18:22阅读: 孑孓 努力搬砖,养老婆孩子. 关注 function showid(idname){ var ...
- 微信小程序 通过点击按钮button转跳至另一个界面
1.在index.wxml中添加按钮button,并添加bindtap <button id="button1" bindtap="goto">&l ...
- jQuery-点击按钮页面滚动到顶部,底部,指定位置
$('.scroll_top').click(function(){$('html,body').animate({scrollTop: '0px'}, 800);}); //页面滚动至顶部$('.s ...
- ios按钮点击实现android反馈,iOS开发APP内部实现点击按钮切换语言
本文主要针对APP国际化进行操作,使APP内部控件显示语言可以不随系统语言做改变,自由切换. 效果如下: Language.gif 核心方法: NSLocalizedStringFromTable(, ...
最新文章
- 浅谈云服务器都能用来做什么?
- 网页 两秒弹出窗口_电脑网页打不开但qq能用怎么回事
- elasticsearch6.2.3 冷热架构设计
- ValueError: The QuerySet value for an exact lookup must be limited to one result using slicing.
- 成都python数据分析师职业技能_想成为数据分析师,需要重点学习什么技能?
- 双用户windows linux系统,Windows与Linux合二为一?终于能在windows上运行Linux了!
- java 搜索引擎 关键词高亮_和我一起打造个简单搜索之SpringDataElasticSearch关键词高亮(示例代码)...
- 基于python的web应用(二)
- java备份_手把手教你实现Java权限管理系统 后端篇(十三):系统备份还原
- intel hd3000 本 在 64位 ubuntu10.04 下 液晶亮度无法调节 的解决之道(亲测)
- 人体各部分英语 图片
- 实现3D 场景——three.js学习篇二之理解基础概念
- 我国新冠疫苗首批预计接种5000万人次,2月15日前完成
- SqlDbx远程链接DB2数据库
- C语言 输出出生日期
- 软考中级软件设计分享
- 智能修改文案-智能写作平台
- pca , nmds , pcoa 图添加分组的椭圆
- 为什么行程码不能显示到县级,工信部回应
- python语言的特点-Python语言的特点有哪些?