In Xcode, I use the interface constructor (StoryBoard) to lay out most of my layout. However, I want some custom drawing to be done on it. It works very well.
However, there is a problem that I encountered. I have a "bite" from the active tab. (see http://cl.ly/Efno ) I want this bite to be completely transparent. (I set the background color to pink to see which part I want transparent, which is not transparent.)
How I changed the look and looks as follows.
- Set the UITabBar class for my own class in the interface builder for the corresponding tab.
In the awakeFromNib of this class, I set the position and image of the label and the selected image of each panel element. Thus
[tabBarItem setFinishedSelectedImage:selectedImage withFinishedUnselectedImage:image]
Each image completely covers the entire panel in height and has the width of the tab element itself.
- Set the background image to the none tab (fully transparent image)
- Set the background color of the panel to a completely transparent color (now I have a pink color to see where it goes wrong)
- In the interface builder, clear the “opaque” check box for the tab.
However, it is not transparent, the pink part is black. How can I make it transparent?
thanks
source share