3

Appleは、次のようなUITabBarItemを作成するためのViewControllerプログラミングガイドの例を提供しています。

- (id)init {
   if (self = [super initWithNibName:@"MyViewController" bundle:nil]) {
      self.title = @"My View Controller";

      UIImage* anImage = [UIImage imageNamed:@"MyViewControllerImage.png"];
      UITabBarItem* theItem = [[UITabBarItem alloc] initWithTitle:@"Home" image:anImage tag:0];
      self.tabBarItem = theItem;
      [theItem release];
   }
   return self;
}

しかし、私はグラフィック初心者であり、タブバーアイテムにAppleの組み込みグラフィックを使用したいと考えています。どうすればそれができますか?利用可能なアイコンとその名前のリストはどこにありますか?

4

1 に答える 1

8

- (id)initWithTabBarSystemItem:(UITabBarSystemItem)systemItem tag:(NSInteger)tagUITabBarItem の作成に使用します。
可能な UITabBarSystemItem 値については、UITabBarItem クラス リファレンスの「定数」セクションを参照してください。

于 2010-01-26T13:11:49.037 に答える