自定义导航栏左按钮
来源:互联网 发布:淘宝 卖家客服电话 编辑:程序博客网 时间:2024/05/21 08:03
可以用button自定义导航栏左侧按钮,示例代码如下,不过定制后与左侧留有一定宽度,如果想要紧靠左侧,需要重新加个UIView替换原来的NavigationBar,
UIButton* button = [UIButton buttonWithType:UIButtonTypeCustom]; button.frame = CGRectMake(0, 0, 50, 40); [button setBackgroundImage:[UIImage imageNamed:@"nav_menu_icon.png"] forState:UIControlStateNormal]; [button addTarget:self action:@selector(showLeft:) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem* barButton = [[UIBarButtonItem alloc] initWithCustomView:button]; topController.navigationItem.leftBarButtonItem = barButton;
- 自定义导航栏左按钮
- 2016.11.23添加自定义导航栏左按钮
- 导航自定义的左按钮不能靠左的问题
- iOS中自定义导航栏左边返回按钮和按钮不能靠左的问题
- iOS中自定义导航栏左边返回按钮和按钮不能靠左的问题
- 导航栏自定义按钮
- 自定义导航栏按钮
- 自定义导航栏(支持有左右按钮、标题 或者左按钮、标题 或者 有按钮、标题)
- 设置导航栏按钮 左偏
- 导航栏添加自定义按钮(图片在左文字在右)
- 自定义导航栏左边按钮的位置靠左问题,右边按钮的位置靠右的问题
- 自定义导航栏按钮 标题
- 自定义导航栏返回按钮
- 自定义导航栏返回按钮
- 导航栏之自定义按钮
- 自定义导航栏返回按钮
- 自定义导航栏上的返回按钮
- UINavigationBar自定义导航栏背景和按钮
- struts2标签总结
- Do a breadth first traversal of a tree
- oracle 导入数据 错误
- 如何优化UITableView性能
- Matlab常见问题集锦(不断更新)
- 自定义导航栏左按钮
- 使用优化器性能视图获取SQL语句执行环境
- 网络连接
- 2012年8月31日心情记录
- 从技术走向管理的必备实战技能
- Storyboard的简单使用
- java多线程初步-原子性可见性hanppens-before原则
- extjs中grid的多表头
- CXF wsdl2Java