UIBarButtonItem 背景的 Alpha 不能设置为零
我有一个想法,使用我自己的图像作为 BarButton 项目。我做了以下操作:
将 UIView 添加到 Interface Builder 中的 UIToolbar。 View 自动转换为包含 UIView 的 UIBarButtonItem。
将 UIImageView 添加到 UIView
将 UIView 的 Alpha 设置为零
但是,我无法对 UIBarButtonView 上的 alpha 执行任何操作,并且无法获取摆脱背景。
由于 UIBarButtonItem 不是基于视图的,因此使用 UIToolbar 的开箱即用功能似乎无法完成任何操作。或者?
I have an idea to use my own images as BarButton items. I did following:
Added UIView to UIToolbar in Interface Builder.
View was automatically converted to UIBarButtonItem with UIView contained.Added UIImageView to UIView
Set Alpha of the UIView to zero
However, I cannot do anything with alpha on UIBarButtonView and I cannot get rid of background.
Since UIBarButtonItem is not View based, there seems nothing can be done here with out-of-the-box functionality of UIToolbar. Or?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论