Question

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...

Était-ce utile?

La solution

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.

Autres conseils

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];

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top