backBarButtonItem(leftbackButtonItem) 样式问题
我想更改其他 UIBarButtonItem。但是,保留buttonItemStyle...
我想要原来的buttonItemStyle...只更改内部内容
如何制作BackBarButtonItemStlye?
UIBarButtonItem *backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"section" style:<??? what is style?> target:self action:@selector(popView:)];
我如何获得图像按钮样式?
请..帮助^^
我从来没有找到这种风格。
api仅支持以下样式...不支持backbuttonstyle...
UIBarButtonItemStylePlain,UIBarButtonItemStyleBordered,UIBarButtonItemStyleDone,
[self navigationItem] setBackBarButtonItem:backBarButtonItem];
不想要...
[self navigationItem] setLeftBarButtonItem: backBarButtonItem];
是想要..
因为我的自定义buttonItem目标,操作不为零...
我的buttonItem改变了自定义项...
setBackBarButtonItem 只使用默认操作(现在 ViewController 弹出)
setLeftBarButtonItem 是使用任何自定义操作
例如:
[ self navigationController] popToRootViewController];
[[self navigationController] popToViewController:[[[self navigationController] viewControllers] objectAtIndex:2] animated:YES];
不支持 cocoa API backBarButtonItemStyle(图像参考)...大问题
如何解决这个问题?
只画一个illustrator backBarButtonItemStyle图像?
I want change other UIBarButtonItem. but, retain buttonItemStyle...
I want the original buttonItemStyle... only change inner content
How make BackBarButtonItemStlye?
UIBarButtonItem *backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"section" style:<??? what is style?> target:self action:@selector(popView:)];
how i get the image button style?
plz.. help ^^
I never find this style.
api only support below style... not backbuttonstyle...
UIBarButtonItemStylePlain,UIBarButtonItemStyleBordered,UIBarButtonItemStyleDone,
[self navigationItem] setBackBarButtonItem:backBarButtonItem];
is Not Want...
[self navigationItem] setLeftBarButtonItem:backBarButtonItem];
is Want..
because my custom buttonItem target, action is not nil...
my buttonItem is change custom item...
setBackBarButtonItem is only use default Action (now ViewController pop)
setLeftBarButtonItem is use any custom action
ex:
[ self navigationController] popToRootViewController];
[[self navigationController] popToViewController:[[[self navigationController] viewControllers] objectAtIndex:2] animated:YES];
big issue is not supported cocoa API backBarButtonItemStyle(image refrence)...
how to solve this problem?
only draw a illustrator backBarButtonItemStyle image?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要更改父视图控制器的
backBarButtonItem
。使用 UIBarButtonItemStylePlain 作为样式,UIKit 将自动使用背面外观。You need to change the
backBarButtonItem
of the parent view controller. UseUIBarButtonItemStylePlain
as a style and UIKit will automatically use the back appearance.该样式不可定制。您需要使用一些看起来像后退按钮的图像来创建栏按钮。
This style is not customizable. You need to create the bar button with some image that looks like the back button.