2011-01-12 13 views

答えて

1

@Kyle the Unrulyによって提案されたドキュメントを見ると、これはかなり単純です。ここで

は、ボタンやあなた自身のイメージに組み込まれた追加の例です:

UIBarButtonItem * viewSnapShotButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCamera target:self action:@selector(snapShotButtonPressed:)]; 
UIBarButtonItem * fontButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"Font.png"] style:UIBarButtonItemStylePlain target:self action: @selector(fontSize:)]; 

// Add buttons to the tab bar 
NSMutableArray *topCentreItems = [[NSMutableArray alloc] init]; 
UITabBar *topCentreTabBar = [[UITabBar alloc] initWithFrame:CGRectMake(0, 0, 120, 75]; 
[topCentreItems addObject:viewSnapShotButton]; 
[topCentreItems addObject:fontButton]; 
topCentreTabBar.items = topCentreItems; 
関連する問題