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 ...
随机推荐
- java static语句的总结
static 是静态方法,他的引用不需要对象,可以使用类名直接进行引用,当然也不需要this. 由于不需要对象,所以static方法内无法调用非static的方法或对象 至于为什么mai ...
- spring jar包依赖
- css3 二维码 添加 扫描特效
<section data-role="paragraph" class="_135editor" style="border: 0px non ...
- JSOIWC2019游记
世除我WC...都去广二了qaq,就我还在nj ycs至少也去了pkuwc啊 这个JSOIWC2019的内容看起来很水,进入条件简单,但窝啥都不会,肯定垫底 内容清单: 1.26 上午听机房dalao ...
- Android一个工程引用另一个工程的方法
一个工程包含另一个工程.相当于一个jar包的引用.但又不是jar包反而像个package 现在已经有了一个Android工程A.我们想扩展A的功能,但是不想在A的基础上做开发,于是新建了另外一个And ...
- 运行软件出现:模块“msvcp110.dll”已加载,但找不到入口点DllRegister
根据百度大多数回答来说 1:先是出现 无法启动程序,因为计算机丢失mfc110.dll 尝试重新安装该程序以解决问题 错误处理:下载或者在别人电脑上拷一份 如:'msvcp110.dll‘ 这类文 ...
- 百度AI搜索引擎
一.爬虫协议 与其它爬虫不同,全站爬虫意图爬取网站所有页面,由于爬虫对网页的爬取速度比人工浏览快几百倍,对网站服务器来说压力山大,很容易造成网站崩溃. 为了避免双输的场面,大家约定,如果网站建设者不愿 ...
- 关于vim的折叠
参考: http://www.cnblogs.com/fakis/archive/2011/04/14/2016213.html 和 这篇文章: https://blog.csdn.net/benda ...
- idea maven列表有问题的
idea maven列表有问题的,覆盖 C:\Users\用户名\.IntelliJIdea2017.2\system\Maven\Indices路径大致在这里 文件为 Indices.rar ...
- js 数组的拷贝
在js中,数组Array是引用类型,直接将数组赋值给一个变量名,二者所指向的地址是一样的. 所以直接复制数组会产生意想不到的结构. 要想解决拷贝一个数组但是对副本的修改不影响原来的数组,有以下方式: ...