4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Swift 3】UIStatusBarStyle の変更

Posted at

iOS 10 以前(Swift 2.3以前)

UIStatusBarStyle を変えるには今までこのように記述していました。

override func preferredStatusBarStyle() -> UIStatusBarStyle {
    return .LightContent
}

iOS 10.0 以降(Swift 3.0以降)

しかし、iOS 10.0 からはこのように記述します。

override var preferredStatusBarStyle: UIStatusBarStyle {
    return .lightContent
}

今だとググっても以前の書き方しかヒットしないので、取り急ぎ。

参考

4
2
1

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
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?