Navigationbar 右侧按钮
2015-07-06 13:32
387 查看
UIBarButtonItem *updateButton = [[UIBarButtonItem alloc] initWithTitle:@"修改" style:UIBarButtonItemStylePlain target:self action:@selector(updateInfo)];
self.navigationItem.rightBarButtonItem = updateButton;
navigationbar 左侧按钮
{
self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"首页"style:UIBarButtonItemStyleBordered target:self action:@selector(popToRootView)]
autorelease];
self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"测试"style:UIBarButtonItemStyleBordered target:self action:@selector(test)]
autorelease];
}
- (void)popToRootView
{
[self.navigationController popToRootViewControllerAnimated:YES];
}
self.navigationItem.rightBarButtonItem = updateButton;
navigationbar 左侧按钮
{
self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"首页"style:UIBarButtonItemStyleBordered target:self action:@selector(popToRootView)]
autorelease];
self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"测试"style:UIBarButtonItemStyleBordered target:self action:@selector(test)]
autorelease];
}
- (void)popToRootView
{
[self.navigationController popToRootViewControllerAnimated:YES];
}
相关文章推荐
- 通过使用浏览器对象模型,输出当前浏览器窗口中打开的文档的URL信息,并将显示在窗口中。
- android开发:把指定的日志输出到指定的文件
- 实战Memcached缓存系统(3)Memcached配置参数初解
- win8 远程桌面时提示凭证不工作问题的终极解决办法
- [LeetCode][JavaScript]Power of Two
- 资源调处理 (10000变成1W 和 值是100 1.2.3. 到100)
- 小兔的棋盘 2067
- TOMCAT 独立用户启动配置 安全部署
- linux 退出vi
- rhel启用xdmcp
- android数据储存
- session过期后自动跳转到登陆页
- 常用指令-起步阶段
- libgdx的菜单配置,以及json文件的结构
- 破解WebLogic管理密码
- iOS 去掉UITableView风格为group时候的最顶部的空白距离
- openwrt 添加vsftpd服务器
- JBOSS最大连接数配置和jvm内存配置
- 操作系统的思维导图
- java数据类型