LoginSignup
7
9

More than 3 years have passed since last update.

ダークモード非対応

Last updated at Posted at 2019-09-21

iOS13でのダークモードを一時的にしのぐ方法

Info.plistUIUserInterfaceStyleキーにlightではなく、Lightを指定することで、アプリ内では常にライトモード扱いにすることができるようです。
エルは大文字である必要がありそうです。大文字でない場合Validateで怒られます(怒られました)
スクリーンショット 2019-09-22 12.42.33.png

  • 正しい設定
    スクリーンショット 2019-09-22 12.46.58.png
  • 誤った設定
    スクリーンショット 2019-09-21 22.45.33.png

部分的にしのぐ方法

override func viewDidLoad() {
    super.viewDidLoad()
    overrideUserInterfaceStyle = .light
}

注意

appleさんとしては、ダークモードへの対応を強く、強く推しているようです。
はやく対応しなくては...

参考

Choosing a Specific Interface Style for Your iOS App

7
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
9