IOS开发实现右侧按钮功能的内容
来源:爱站网时间:2022-09-14编辑:网友分享
今天来给大家说说看IOS开发实现右侧按钮功能的内容,对这方面内容比较感兴趣的小伙伴可以看看爱站技术频道小编所整理的资料,相信这篇文章能帮助到你解决问题。
一,工程图。

二,代码。
ViewController.m
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
//增加右侧按钮
[self addRightButton];
}
#pragma -mark -functions
//增加右侧按钮
-(void)addRightButton
{
UIBarButtonItem *selectButton = [[UIBarButtonItem alloc] initWithTitle:@"筛选" style:UIBarButtonItemStyleDone target:self action:@selector(doClickRightButton)];
self.navigationItem.rightBarButtonItem = selectButton;
}
#pragma -mark -doClickAction
-(void)doClickRightButton
{
FirstViewController *first=[[FirstViewController alloc]init];
[self.navigationController pushViewController:first animated:NO];
}
以上就是关于IOS开发实现右侧按钮功能的内容了,希望各位朋友都看明白了,如果对这方面内容存在疑惑,可以来网站联系小编。更多精彩内容尽在js.aizhan.com。
上一篇:IOS开发如何添加文本链接与图片
下一篇:IOS开发之视频截屏的实例代码
