System default Tabbar feel good small, very ugly, so I have to set its own size
We need to
+ (void) load or set in + (void) Initialize
So what's the difference between these two methods?
Can see here: (reprint) HTTP://WWW.JIANSHU.COM/P/9368CE9BB8F9
We're here to use the Load method
In the controller in the custom Tabbar + (void) load{ //Get the Tabbaritem of the current class uitabbaritem *item = [Uitabbaritem Appearancewhencontainedin:self, nil]; Set all item's selected color //Set selected text color //Create dictionary to describe text nsmutabledictionary *attr = [nsmutabledictionary dictionary]; Text color---Description Rich Text attribute key, NSAttributedString.h attr[nsforegroundcolorattributename] = [Uicolor blackcolor];< C8/>[item settitletextattributes:attr forstate:uicontrolstateselected]; Set the font size //font size with normal nsmutabledictionary *attrnor = [Nsmutabledictionary dictionary] through the normal state; Set Font attrnor[nsfontattributename] = [Uifont systemfontofsize:13]; [item Settitletextattributes:attrnor forstate:uicontrolstatenormal];}
How to set the text size of a custom tabbar-------iOS