#import "ViewController.h"
@interfaceviewcontroller ()
@end
@implementation Viewcontroller
-(void) Viewdidload {
[superviewdidload];
Additional setup after loading the view, typically from a nib.
// set screen background color
self. View. BackgroundColor = [uicolorlighttextcolor];
// Initialize Uitabbar
Uitabbar* TabBar = [[UitabbarAlloc]initWithFrame:CGRectMake(0, Self.View.Frame.Size.Height - the, Self.View.Frame.Size.Width, the)];
// Initialize Baritem
UIImage * imgForItem1 = [UIImageimagenamed:@ "Icon_cinema"];
UIImage * imgForItem2 = [[UIImageimagenamed:@] [ Email protected] "imagewithrenderingmode:uiimagerenderingmodealwaysoriginal];
Uitabbaritem * item1 = [[uitabbaritemalloc]initwithtitle:@ "Cinema" image: imgForItem1 selectedimage: imgForItem2];
< Span style= "COLOR: #000000" > uitabbaritem * item2 = [[ uitabbaritem Alloc] initwithtitle: @ "2" image:[ UIImage imagenamed: @" more_select_setting " " tag : 101 ];
&NBSP;
< Span style= "COLOR: #000000" > uitabbaritem * item3 = [[ uitabbaritem Alloc] initwithtitle: @ "3" image:[ UIImage imagenamed: @" Movie_cinema " " tag: 102 ];
&NBSP;
< Span style= "COLOR: #000000" > uitabbaritem * item4 = [[ uitabbaritem Alloc] initwithtitle: @ "Movie" image:[ UIImage imagenamed: @" msg_new " " tag: Span style= "COLOR: #272ad8" >103 ];
UIImage * img1foritem5 = [UIImageimagenamed:@ "start_top250"];
UIImage * IMG2FORITEM5 = [[UIImageimagenamed:@ " start_top250 "]imagewithrenderingmode:uiimagerenderingmodealwaysoriginal];
Uitabbaritem * ITEM5 = [[uitabbaritemalloc]initwithtitle:@ "9" Image: Img1foritem5 selectedimage: IMG2FORITEM5];
Nsbackgroundcolorattributename
// use a dictionary to set the font color of ITEM5
< Span style= "COLOR: #000000" > nsdictionary * dict = @{ nsfontattributename:[ Uifont systemfontofsize : 18 ], Nsforegroundcolorattributename:[ uicolor Span style= "COLOR: #3d1d81" >yellowcolor ] } ;
// set the font and color of the highlighted state
[item5 settitletextattributes:d ICTforstate:uicontrolstatehighlighted];
nsarray * array = @[item1,item2,item3,item4,item5];
TabBar. items = array;
[Self. View addsubview: TabBar];
}
-(void) didreceivememorywarning {
[superdidreceivememorywarning];
//Dispose of any resources, can be recreated.
}
@end
Uitabbar,uitabbaritem how to set Uitabbaritem font size and color in a dictionary, keep the original color (ITEM5) Uitabbar,uitabbaritem How to set Uitabbaritem font size and color in a dictionary, Keep the original color (ITEM5) Uitabbar,uitabbaritem How to set Uitabbaritem font size and color in a dictionary, keep the original color (ITEM5) Uitabbar, Uitabbaritem how to set Uitabbaritem font size and color in a dictionary, keep the original color (ITEM5) Uitabbar,uitabbaritem How to set Uitabbaritem font size and color in a dictionary, Keep the original color (ITEM5) Uitabbar,uitabbaritem How to set Uitabbaritem font size and color in a dictionary, keep the original color (ITEM5) Uitabbar, Uitabbaritem how to set Uitabbaritem font size and color in a dictionary, keep the original color (ITEM5)
Uitabbar,uitabbaritem how to set Uitabbaritem font size and color in a dictionary, keep the original color (ITEM5)