31 lines
1.0 KiB
Swift
31 lines
1.0 KiB
Swift
//
|
|
// OnboardingViewControllerAppearance.swift
|
|
// Mastodon
|
|
//
|
|
// Created by sxiaojian on 2021/2/25.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
protocol OnboardingViewControllerAppearance: UIViewController {
|
|
func setupOnboardingAppearance()
|
|
}
|
|
|
|
extension OnboardingViewControllerAppearance {
|
|
func setupOnboardingAppearance() {
|
|
overrideUserInterfaceStyle = .light
|
|
view.backgroundColor = Asset.Colors.Background.onboardingBackground.color
|
|
|
|
// set navigationBar transparent
|
|
let barAppearance = UINavigationBarAppearance()
|
|
barAppearance.configureWithTransparentBackground()
|
|
navigationController?.navigationBar.standardAppearance = barAppearance
|
|
navigationController?.navigationBar.compactAppearance = barAppearance
|
|
navigationController?.navigationBar.scrollEdgeAppearance = barAppearance
|
|
|
|
let backItem = UIBarButtonItem()
|
|
backItem.title = L10n.Common.Controls.Actions.back
|
|
navigationController?.navigationBar.topItem?.backBarButtonItem = backItem
|
|
}
|
|
}
|