UINavigationController的title添加点击事件
来源:互联网 发布:淘宝属性词是什么 编辑:程序博客网 时间:2024/06/05 14:08
- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. self.view.backgroundColor = [UIColor greenColor]; // 首先定义一个Button UIButton * button = [UIButton buttonWithType:(UIButtonTypeRoundedRect)]; // 添加 按钮名字 [button setTitle:@"点击" forState:(UIControlStateNormal)]; // 添加点击方法 [button addTarget:self action:@selector(actionButton) forControlEvents:(UIControlEventTouchUpInside)]; // 自适应大小 [button sizeToFit]; // 添加到 表头 title self.navigationItem.titleView = button;}// 实现点击方法- (void)actionButton{ NSLog(@"我是表头, 点击我");}
0 0
- UINavigationController的title添加点击事件
- UINavigationController的title添加点击事件并nsstring转nsdictionary
- UINavigationController的title设置图片
- UINavigationController的title不显示
- 修改UINavigationController中leftBarButtonItem按钮的title
- 修改UINavigationController中leftBarButtonItem按钮的title
- UINavigationController 的 title 居中显示 (UINavigationController 的 title 文字多时居中显示)
- 给android的LinearLayout添加点击事件
- 给android的LinearLayout添加点击事件
- 给android的LinearLayout添加点击事件
- 给Android的LinearLayout添加点击事件
- 给android的LinearLayout添加点击事件
- 为RecyclerView添加item的点击事件
- 为RecyclerView添加item的点击事件
- webView加载的图片添加点击事件
- 给TextView添加点击事件的写法
- 为RecyclerView添加item的点击事件
- 为RecyclerView添加item的点击事件
- rand和srand的用法(转载)
- 参考
- 80端口被system进程占用/IIS占用
- HDOJ 1052 Tian Ji -- The Horse Racing(贪心)
- 用UIApplication来管理状态栏
- UINavigationController的title添加点击事件
- 正则匹配中文字符
- IOS开发 - 屏幕旋转
- Android平台读写i2c设备开发笔记
- python爬取网页信息
- java队列queue
- 帮助命令
- 计算机视觉
- 习题9-4 uva 1630