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 ...
随机推荐
- 1333:【例2-2】Blah数集
1333:[例2-2]Blah数集 注意是数组,答案数组中不能有重复数字 q数组是存储答案的 代码: #include<iostream> #include<cstdio> # ...
- activiti5/6 系列之--BpmnModel使用
BpmnModel对象,是activiti动态部署中很重要的一个对象,如果BpmnModel对象不能深入的理解,那可能如果自己需要开发一套流程设计器,使用bpmn-js使用前端或者C/S展现流程流转而 ...
- java笔记 -- 类与对象
封装: 从形式上看, 封装是将数据和行为组合在一个包中, 并对对象的使用者隐藏了数据的实现方式. 对象中的数据称为实例域, 操纵数据的过程称为方法. 对于每个特定的类实例(对象)都有一组特定的实例域值 ...
- 3、VNC
VNC(Virtual Network Computing,虚拟网络计算机) VNC分为两部分组成:VNC server 和 VNC viewer VNC安装 1.yum install tigerv ...
- 数据分析库之Numpy
Numpy get started NumPy中我们要学习的核心其实就是一个 ndarray n多 d dimension 维度 array数组 多维数组 创建一个ndarray的几种方法 impor ...
- Vue项目在真机测试
一:修改config 找到config文件夹下的index.js文件并修改为: module.exports = { dev: { host: '0.0.0.0' // 原为: hotst: 'loc ...
- 设计图与html 对比
简易打开旧版火狐 网页版火狐添加组件 新版有时也会没有 谷歌是腾讯的
- MAC 下 Excel打开UTF-8格式的文件乱码
为了识别 Unicode 文件,Microsoft 建议所有的 Unicode 文件应该以 ZERO WIDTH NOBREAK SPACE字符开头.这作为一个”特征符”或”字节顺序标记(byte-o ...
- redis 版的 hello world
为 redis 添加一个命令,效果如下图: 在 Server.h 中加入命令处理函数的声明: void meCommand(client *c); 在 Server.c 的命令表中加入: struct ...
- angularjs 下滑线滑动
css: .detail_row { width: 410px; height: 34px; clear: both; border-bottom: 1px solid #eaeeef; font-s ...