0
私のタブバーがグレーの矩形でレンダリングされたのはなぜですか?
// Tabbar
// Icon inactive
[[UITabBarItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor darkGrayColor]} forState:UIControlStateNormal];
// Icon active
[[UITabBar appearance] setTintColor:PRIMARY_COLOR];
// Text active
[[UITabBarItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: PRIMARY_COLOR} forState:UIControlStateSelected];
// Background
[[UITabBar appearance] setBarTintColor:WHITE_COLOR];
// Over View YES/NO
[[UITabBar appearance] setTranslucent:NO];
私は、テキストとアイコンの周りにグレーの矩形をしました。 なぜですか?私の間違いはどこですか?
このコードは正常に動作しました。あなたはタブバーで他に何かしましたか? – trungduc
こんにちは@trungducあなたの答えをありがとう、mmmいいえ。私はこれらのスニペットをappdelegate didFinishWithOptionsに追加しました。私が使用している画像は、単に透明な背景を持つ白です。他に何か意味がありますか? – CeccoCQ
プログラムで、またはストーリーボード内でイメージを設定しましたか?プログラムによっては、コードを表示できますか? – trungduc