Mat*_*att 7 iphone cocoa-touch
好的,所以我成功添加了一个rightBarButtonItem来调用自定义选择器(从UIViewController调用),如下所示:
UIButton* infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight];
[infoButton addTarget:self action:@selector(showInfoView:) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:infoButton];
Run Code Online (Sandbox Code Playgroud)
是否可以使"右栏按钮项"实际上是几个不同的按钮(从而从导航栏中删除标题文本)?
我正在寻找获得更多屏幕空间的方法,这似乎是一个合乎逻辑的选择......虽然任何其他建议都会受到赞赏(也许我应该减少我在底部使用的标签栏的大小......)
iPh*_*lly 21
UIBarButtonItem *addAcc = [[UIBarButtonItem alloc]
initWithTitle:@"Add"
style:UIBarButtonItemStylePlain
target:self
action:@selector(addNewAcc)];
UIBarButtonItem *delAcc = [[UIBarButtonItem alloc]
initWithTitle:@"Del"
style:UIBarButtonItemStylePlain
target:self
action:@selector(DeleteButtonAction)];
NSArray *arrBtns = [[NSArray alloc]initWithObjects:addAcc,delAcc, nil];
self.navigationItem.rightBarButtonItems = arrBtns;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
18562 次 |
| 最近记录: |