Dynamically create a tab bar The controller does not say, it is to take some controls from the view library, which is to use the tab controller, and then create two socket variables associated with the dragged control. Now let's focus on how to set the tab-controller:
(1) Set the entry title
Self.title = @ "First view"; [Self.tabbaritem settitletextattributes:[nsdictionary Dictionarywithobjectsandkeys:[uicolor BlackColor], Uitextattributetextcolor,[uifont Fontwithname:nil Size:18],uitextattributefont, nil] ForState:UIControlStateNormal ];
(2) system comes with picture
Uitabbaritem *t = [[Uitabbaritem alloc]initwithtabbarsystemitem:uitabbarsystemitemmostviewed tag:1]; Self.tabbaritem = t;
(3) Custom add picture
Uitabbaritem *t1 = [[Uitabbaritem alloc]initwithtitle:@ "Forward" Image:[uiimage imagenamed:@ "Forward.png"] tag:1]; Self.tabbaritem = T1;
iOS Development Learning # TAB Bar Controller # (6) Set Tab bar Controller