ios中模态弹窗用法及UINavigationController基本用法
- (void)viewDidLoad {
[super viewDidLoad];
//点击按钮跳转
loginViewController *vc=[[loginViewController alloc] init];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
[self presentViewController:nav animated:YES completion:nil];
}
@implementation loginViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"取消" style:UIBarButtonItemStyleDone target:self action:@selector(cancel)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"注册" style:UIBarButtonItemStyleDone target:self action:@selector(regist)];
self.title = @"登陆";
}
//取消
- (void)cancel
{
[self dismissModalViewControllerAnimated:YES];
}
//注册
-(void)regist
{
}
@end

@implementation MJOneViewController
- (void)viewDidLoad
{
[super viewDidLoad]; self.navigationItem.title = @"第1个控制器"; // 修改下一个界面返回按钮的文字
self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStyleDone target:nil action:nil];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCamera target:nil action:nil];
} - (IBAction)jumpTwo {
// 调到第2个控制器
MJTwoViewController *two = [[MJTwoViewController alloc] init];
//[self.navigationController presentModalViewController:two animated:YES];
[self.navigationController pushViewController:two animated:YES];
}
@end
@implementation MJTwoViewController - (void)viewDidLoad
{
[super viewDidLoad]; self.navigationItem.titleView = [UIButton buttonWithType:UIButtonTypeContactAdd];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemTrash target:nil action:nil];
self.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc] initWithTitle:@"哈哈" style:UIBarButtonItemStyleDone target:self action:nil];
} - (IBAction)jumpThree {
MJThreeViewController *three = [[MJThreeViewController alloc] init];
[self.navigationController pushViewController:three animated:YES];
}
@end
ios中模态弹窗用法及UINavigationController基本用法的更多相关文章
- iOS中block的用法 以及和函数用法的区别
ios中block的用法和函数的用法大致相同 但是block的用法的灵活性更高: 不带参数的block: void ^(MyBlock)() = ^{}; 调用的时候 MyBlock(); 带参数的 ...
- 【IOS】ios中NSUserDefault与android中的SharedPreference用法简单对比
以下内容为原创,欢迎转载,转载请注明 来自天天博客:http://www.cnblogs.com/tiantianbyconan/p/3405308.html 有Android开发经验的朋友对Shar ...
- IOS中的UINavigationController(导航控制器)
UINavigationController UINavigationControlle:导航控制器,是iOS中最常用的多视图控制器之一,它用来管理多个试图控制器 导航控制器可以认为是管理控制器的控制 ...
- 微信中使用popup等弹窗组件时点击输入框input键盘弹起导致IOS中按钮无效处理办法
因为在IOS微信中在弹窗中使用input使键盘弹起,使弹窗的位置上移,当键盘关闭时页面还在上面,弹窗位移量也在上面,只有下拉才能回到原位,这样弹窗也消失了.我的处理办法就是在键盘弹起和消失的时候,让页 ...
- react-native自定义Modal模态框|仿ios、微信弹窗RN版
前序 纵观每个优质项目,无论web端还是native原生应用开发,弹窗都是不可忽视的一环,能很大程度上直接决定用户体验.如:微信.支付宝.ios都有很成熟的一套弹窗UI展示场景. 最近一直沉迷在rea ...
- uni-app自定义Modal弹窗组件|仿ios、微信弹窗效果
介绍 uniapp自定义弹窗组件uniPop,基于uni-app开发的自定义模态弹窗|msg信息框|alert对话框|confirm确认框|toast弱提示框 支持多种动画效果.多弹窗类型ios/an ...
- IOS中调用系统的电话、短信、邮件、浏览功能
iOS开发系列--通讯录.蓝牙.内购.GameCenter.iCloud.Passbook系统服务开发汇总 2015-01-13 09:16 by KenshinCui, 26990 阅读, 35 评 ...
- iOS 中有用的开源库
youtube下载神器:https://github.com/rg3/youtube-dl vim插件:https://github.com/Valloric/YouCompleteMe vim插件配 ...
- ios 中的小技巧 - 总有你想要的 一
UITableView的Group样式下顶部空白处理 在viewWillAppear里面添加如下代码: //分组列表头部空白处理 CGRect frame = myTableView.tableHea ...
随机推荐
- Python数据分析Numpy库方法简介(一)
Numpy功能简介: 1.官网:www.numpy.org 2.特点:(1)高效的多维矩阵/数组; (2);复杂的广播功能 (3):有大量的内置数学统计函数 矩阵(多维数组): 一维数组: ([ 值 ...
- 2、Kafka架构
Kafka架构图 1)Producer :消息生产者,就是向kafka broker发消息的客户端. 2)Consumer :消息消费者,向kafka broker取消息的客户端 3)Topic :可 ...
- Docker Kubernetes 健康检查
Docker Kubernetes 健康检查 提供Probe探测机制,有以下两种类型: livenessProbe:如果检查失败,将杀死容器,然后根据Pod的重启策略来决定是否重启. readines ...
- 尚硅谷面试第一季-18ES与Solr的区别
背景:它们都是基于Lucene搜索服务器基础之上开发,一款优秀的,高性能的企业级搜索服务器.[是因为他们都是基于分词技术构建的倒排索引的方式进行查询] 开发语言:Java语言开发 诞生时间:Solr ...
- Linux 查看进程之PS命令
要对进程进行检测和控制,首先必须要了解当前进程的情况,也就是需要查看当前进程运行状态.Linux 系统中 我们可以使用 ps 命令查看进程. ps 命令介绍 ps(process stat ...
- 【转】 ISP-镜头阴影校正(LSC)
转自:https://blog.csdn.net/xiaoyouck/article/details/77206505 介绍镜头阴影校正(Lens Shading Correction)是为了解决由于 ...
- canvas实现点连线动画
给定一系列坐标(x, y)点, 实现将各个点按照先后顺序连接起来的动画.还有两个要求: 1.点与点之间直接用线段连接, 不用考虑曲线 2.动画支持暂停, 继续, 重头开始播放功能 这个功能该怎么实现呢 ...
- javascript高级程序设计第3版——第二章使用javascript
- 如何解决ORA-28002 the password will expire within 7 days问题(密码快过期)
1.问题描述: 今天登陆pl/sql工具时,提示 ORA-28002 the password will expire within 7 days 2.问题原因: oracle11g中默认在defau ...
- 禁用cookie后的方法
保存session id的方式可以采用cookie,这样在交互过程中浏览器可以自动的按照规则把这个标识发送给 服务器.一般这个cookie的名字都是类似于SEEESIONID.但cookie可以被人为 ...