1

CGRectMakeを使用してタブバーの高さを増やしましたが、質問は次のとおりです。シャドウ(選択したときにタブバーアイテムの上に表示される)の高さを増やすことはできますか?そしてどうやって ?

4

2 に答える 2

1

カスタム タブ バーについては、このチュートリアルとソース コードを参照してください。

カスタム タブバー

multi-Example があり、カスタム シャドウ用が 1 つあります。

あなたを助けることを願っています。

于 2012-11-11T12:29:54.580 に答える
1

あなたの質問については、以前に試したことはありませんが、可能だと思います。この参照リンクhttp://developer.apple.com/library/ios/documentation/UIKit/Reference/UITabBar_Class/UITabBar_Class.pdfから、シャドーイメージディスカッションで

Discussion
The default value is nil, which corresponds to the default shadow image. When non-nil, this property
represents a custom shadow image to show instead of the default. For a custom shadow image to be shown,
a custom background image must also be set using the backgroundImage (page 5) property. If the default
background image is used, then the defaultshadow image will be used regardless of the value of this property

更新: 自分でこれを発見してくれてありがとうMuhannad Dasoqie:)

[self.tabbarController.tabBar setSelectionIndicatorImage:[UIImage imageNamed:@"Selected_Tab_Shadow.png"]];
于 2012-11-11T12:25:35.297 に答える