Swift/UIKit/AppearanceCustomization/UITabBarAppearance: Difference between revisions
Jump to navigation
Jump to search
imported>Fire Created page with "{{Infobox Swift |name=UITabBarAppearance |Type=Class |iOS=13.0 |iPadOS=13.0 |macOS= |MacCatalyst=13.1 |tvOS=13.0 |watchOS= |Website={{URL|https://developer.apple.com/documentation/uikit/uitabbarappearance/}} }} タブバーの外観をカスタマイズするためのオブジェクト。 iOS 15以上だとナビゲーションバーが透過されてしまうので14以前の非透過に戻す設定。 <syntaxhighlight lang="Swift"> let tabBarAppearance = UITabBarA..." |
(No difference)
|
Latest revision as of 13:02, 11 November 2022
Type | Class |
---|---|
iOS | 13.0+ |
iPadOS | 13.0+ |
MacCatalyst | 13.1+ |
tvOS | 13.0+ |
Website | developer |
タブバーの外観をカスタマイズするためのオブジェクト。
iOS 15以上だとナビゲーションバーが透過されてしまうので14以前の非透過に戻す設定。
let tabBarAppearance = UITabBarAppearance()
//バー外観オブジェクトを設定し、デフォルトの背景と影の値を設定する。
tabBarAppearance.configureWithDefaultBackground()
//ナビゲーションバーの外観にデフォルト値を設定する
UITabBar.appearance().standardAppearance = tabBarAppearance
UITabBar.appearance().scrollEdgeAppearance = tabBarAppearance