码迷,mamicode.com
首页 > 移动开发 > 详细

iOS 之 导航栏按钮

时间:2016-01-06 16:07:03      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:

UIButton *releaseButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
        [releaseButton setTitle:@"发布" forState:normal];
        [releaseButton addTarget:self action:@selector(releaseInfo:) forControlEvents:UIControlEventTouchUpInside];
        UIBarButtonItem *releaseButtonItem = [[UIBarButtonItem alloc] initWithCustomView:releaseButton];
        self.navigationItem.rightBarButtonItem = releaseButtonItem;

 

iOS 之 导航栏按钮

标签:

原文地址:http://www.cnblogs.com/SimonGao/p/5105667.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!