您的位置:首页 > 其它

如何在导航栏的两侧加多个Button

2015-11-02 21:17 169 查看
1.Just Follow ME

UIBarButtonItem *anotherButton =[[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"CollectIcon"] style:UIBarButtonItemStylePlain target:self action:@selector(Like:)];

UIBarButtonItem *anotherButton2 = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"detailpage_sharebutton_up"] style:UIBarButtonItemStylePlain target:self action:@selector(dealShare:)];

UIBarButtonItem *anotherButton3 = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"TextIcon"] style:UIBarButtonItemStylePlain target:self action:@selector(changeFont:)];

[self.navigationItem setRightBarButtonItems:[NSArray arrayWithObjects: anotherButton,anotherButton2,anotherButton3,nil]];


2.如图所示

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: