我想更改其他 UIBarButtonItem。但是,保留 buttonItemStyle...
我想要原来的buttonItemStyle...只改变内部内容
如何制作 BackBarButtonItemSTLye?
UIBarButtonItem *backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"section" style:<??? what is style?> target:self action:@selector(popView:)];
我如何获得图像按钮样式?
请..帮助^^
我从来没有找到这种风格。
api 只支持以下样式...不支持后退按钮样式...
UIBarButtonItemStylePlain,UIBarButtonItemStyleBordered,UIBarButtonItemStyleDone,
[self navigationItem] setBackBarButtonItem:backBarButtonItem];
不是想要...
[self navigationItem] setLeftBarButtonItem:backBarButtonItem];
是想要..
因为我的自定义 buttonItem 目标,action 不是 nil...
我的 buttonItem 是更改自定义项...
setBackBarButtonItem 仅使用默认操作(现在 ViewController 弹出)
setLeftBarButtonItem 是使用任何自定义操作
例如:
[ self navigationController] popToRootViewController];
[[self navigationController] popToViewController:[[[self navigationController] viewControllers] objectAtIndex:2] animated:YES];
大问题是不支持 cocoa API backBarButtonItemStyle(image refrence)...
如何解决这个问题?
只画一个illustrator backBarButtonItemStyle图像?
最佳答案
您需要更改父 View Controller 的 backBarButtonItem
。使用 UIBarButtonItemStylePlain
作为样式,UIKit 将自动使用背面外观。
关于iphone - backBarButtonItem(leftbackButtonItem) 样式问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7221431/