damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

Theme.swift (389B)


      1 //
      2 //  Theme.swift
      3 //  damus
      4 //
      5 //  Created by Ben Weeks on 1/1/23.
      6 //
      7 
      8 import Foundation
      9 import UIKit
     10 
     11 class Theme {
     12     
     13     static var safeAreaInsets: UIEdgeInsets? {
     14         return UIApplication
     15                 .shared
     16                 .connectedScenes
     17                 .flatMap { ($0 as? UIWindowScene)?.windows ?? [] }
     18                 .first { $0.isKeyWindow }?.safeAreaInsets
     19     }
     20 }