Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
タブバー項目の数がユーザーによって定義されるタブバーを作成したいと思います (変数 NumberOfTabBarItem に格納されているとしましょう)。タブバーの項目をある種の配列に入れて表示する方法はありますか? ありがとう!
UITabBarクラス参照から、プロパティがあります...
@property(nonatomic, copy) NSArray *items
でアクセスできます...
- (void)setItems:(NSArray *)items animated:(BOOL)animated
したがって、プログラムでNSArrayにTabBarアイテムをロードし、そのメソッドを使用して表示することができます。