4
4

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 3 years have passed since last update.

Swift 色々な高さを取得

Posted at

環境

Swift5
Xcode12.5

画面サイズ

let mainBoundSize: CGSize = UIScreen.main.bounds.size

StatusBarの高さ

let statusBarHeight = self.view.window?.windowScene?.statusBarManager?.statusBarFrame.height ?? 0

NavigationBarの高さ

let navigationBarHeight = self.navigationController?.navigationBar.frame.height ?? 0

参考

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?