Put a UIButton inside the UIBarButton item. The button can be transparent. In Xcode's Interface Builder, just drag a UIButton to one of the empty corners of the UINavigationBar. Xcode will automatically create a UIBarButtonItem and put the UIButton inside it. You can then set the UIButton type to Custom and apply other properties such as title or image.
how to create a transparent UIBarButtonItem?
-
16-03-2022 - |
题
I have a UINavigationBar with a pattern on it. I've seen a lot of UI that implement transparent UIBarButtonItem, and I wonder how to make the same.
Tint dosent do the trick unfortunately...
please help...
解决方案
其他提示
Follow the procedure described by Melsam and set the transparency of the button by using
button.backgroundColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.5];
不隶属于 StackOverflow