With the system Tabbar, if the whole tabbar is a regular rectangle, it is not easy to see the upper is a line, but irregular words, there will be a black line across there, very affect the interface beautiful, like this:
Located in Tabbar, and the button is tied, is a imageview:
To change it, you have to know what the specific name is, jump to the library's Tabbar file to look at, as follows:
There are three built-in image: Background picture, selected picture, Shadow picture,
And then modify these three image
Remove the top line of the Tabbar
CGRect rect = CGRectMake (0, 0, screenwidth, screenheight);
Uigraphicsbeginimagecontext (rect.size);
Cgcontextref context = Uigraphicsgetcurrentcontext ();
Cgcontextsetfillcolorwithcolor (context, [[Uicolor Clearcolor] cgcolor]);
Cgcontextfillrect (context, rect);
UIImage *img = Uigraphicsgetimagefromcurrentimagecontext ();
Uigraphicsendimagecontext ();
[Tbc.tabbar setbackgroundimage:img];
[Tbc.tabbar setshadowimage:img];
Success. The results are as follows:
Principle: Actually did not delete the horizontal line (remove off), just turn it into transparent does not affect the operation and the interface is beautiful just (visual error).