Post

Replies

Boosts

Views

Activity

Reply to SafeAreaInsets Size for SwiftUI padding
you can use it by adapting it to your need ;) func getSafeAreaTop()->CGFloat{ let keyWindow = UIApplication.shared.connectedScenes .filter({$0.activationState == .foregroundActive}) .map({$0 as? UIWindowScene}) .compactMap({$0}) .first?.windows .filter({$0.isKeyWindow}).first return (keyWindow?.safeAreaInsets.top)! }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’21
Reply to SwiftUI NavigationLink not working when I add @Environment(\.dismiss) to my view
You need to place your @Environment (\.dismiss) var dismiss directly into your .sheet
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to SafeAreaInsets Size for SwiftUI padding
you can use it by adapting it to your need ;) func getSafeAreaTop()->CGFloat{ let keyWindow = UIApplication.shared.connectedScenes .filter({$0.activationState == .foregroundActive}) .map({$0 as? UIWindowScene}) .compactMap({$0}) .first?.windows .filter({$0.isKeyWindow}).first return (keyWindow?.safeAreaInsets.top)! }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21