アップルのカスタムUITabBarItemイメージを使用するには?
-
22-09-2019 - |
質問
Appleは、このように、UITabBarItemを作成するための、プログラミングガイド例ビューコントローラを提供しています:
- (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;
}
しかし、私は、グラフィックのnoobだとAppleは、タブバーの項目のグラフィックスに組み込まれて使用したいです。どのように私はそれを行うだろうか?どこで入手できるアイコンとその名前のリストがありますか?
解決
UITabBarItemを作成するために使用し- (id)initWithTabBarSystemItem:(UITabBarSystemItem)systemItem tag:(NSInteger)tag
。
可能UITabBarSystemItem値については、UITabBarItemクラス参照で「定数」のセクションを見ます。
所属していません StackOverflow