以下の内容はhttps://xyk.hatenablog.com/entry/2016/08/13/124232より取得しました。


いつも設定するAppearanceのメモ

環境:
Swift2.2
iOS8以降対象

いつも設定している Appearance のコピペ用メモ。
以下を AppDelegate で呼ぶ。
mainColor は extension で独自に設定したもの。

private func setupAppearance() {

    // アプリケーション全体のtintColor設定
    self.window?.tintColor = UIColor.mainColor

    // ステータスバーの文字色を白に。
    // プラス`Info.plist`に`View controller-based status bar appearance = NO`を追加
    UIApplication.sharedApplication().statusBarStyle = .LightContent

    // ナビゲーションバーの色
    UINavigationBar.appearance().barTintColor = UIColor.mainColor
    // ナビゲーションバーボタンの色を白に。
    UINavigationBar.appearance().tintColor = UIColor.whiteColor()
    // ナビゲーションバーのタイトル文字色を白に。
    UINavigationBar.appearance().titleTextAttributes = [
        NSForegroundColorAttributeName: UIColor.whiteColor()
    ]
}

こんな感じに。

f:id:xyk:20160813124200p:plain




以上の内容はhttps://xyk.hatenablog.com/entry/2016/08/13/124232より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14