Post

Replies

Boosts

Views

Activity

Reply to SwiftUI - Navigation Bar Fails to Switch From Scroll Edge Appearance
You might want to consider implementing a Navigation Bar Appearance ViewModifier and applying it to your VStack struct MainView: View { var body: some View { ScrollView { Text("Text") } .frame(maxWidth: .infinity) } } struct TabBarView: View { var body: some View { Color.pink .frame(maxWidth: .infinity) .frame(height: 55) } } struct ContentView: View { var body: some View { NavigationView { VStack(spacing: 0) { MainView() TabBarView() // Commenting this out fixes the problem. } .background(.red) // Commenting this out _also_ fixes the problem. .opaqueNavigationBar( foregroundColor: .white, backgroundColor: .systemBrown, tintColor: .systemIndigo, shadowColor: .darkGray) .navigationBarTitleDisplayMode(.inline) .navigationTitle("Main View") } } } public struct OpaqueNavigationBarAppearance: ViewModifier { public init( font: UIFont = .preferredFont(forTextStyle: .headline), largeTitleFont: UIFont = .preferredFont(forTextStyle: .largeTitle), foregroundColor: UIColor = .clear, backgroundColor: UIColor = .secondarySystemBackground, tintColor: UIColor = .clear, shadowColor: UIColor = .clear) { let appearance = UINavigationBarAppearance() appearance.configureWithOpaqueBackground() appearance.titleTextAttributes = [.foregroundColor: foregroundColor, .font: font] appearance.largeTitleTextAttributes = [.foregroundColor: foregroundColor, .font: largeTitleFont] appearance.shadowColor = shadowColor appearance.backgroundColor = backgroundColor UINavigationBar.appearance().standardAppearance = appearance UINavigationBar.appearance().scrollEdgeAppearance = appearance UINavigationBar.appearance().compactAppearance = appearance UINavigationBar.appearance().tintColor = tintColor } public func body(content: Content) -> some View { return content } } public extension View { func opaqueNavigationBar( font: UIFont = .preferredFont(forTextStyle: .headline), largeTitleFont: UIFont = .preferredFont(forTextStyle: .largeTitle), foregroundColor: UIColor = .clear, backgroundColor: UIColor = .secondarySystemBackground, tintColor: UIColor = .clear, shadowColor: UIColor = .clear) -> some View { ModifiedContent( content: self, modifier: OpaqueNavigationBarAppearance( font: font, largeTitleFont: largeTitleFont, foregroundColor: foregroundColor, backgroundColor: backgroundColor, tintColor: tintColor, shadowColor: shadowColor)) } }
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’23
Reply to Widget background Image not loading IOS 17 Xcode
Here's a sample implementation of containerBackground. LMEntryView is your widget view. struct LMWidget: Widget { var supportedFamilies: [WidgetFamily] { [.systemSmall, .systemMedium] } var body: some WidgetConfiguration { StaticConfiguration(kind: "LMWidget", provider: LMTimelineProvider()) { entry in if #available(iOS 17, *) { LMEntryView(entry: entry) .frame(maxWidth: .infinity, maxHeight: .infinity) .containerBackground(Color("WidgetBackground"), for: .widget) } else { LMEntryView(entry: entry) .frame(maxWidth: .infinity, maxHeight: .infinity) .background(Color("WidgetBackground")) } } .configurationDisplayName("L_M_Widget_Title".localized) .description("L_M_Widget_Description".localized) .supportedFamilies(supportedFamilies) .contentMarginsDisabled() } }
Jan ’24
Reply to iOS26 bottom toolbars space broken
.toolbar { ToolbarItemGroup(placement: .bottomBar) { GlassEffectContainer { Button { // } label: { VStack { Image( systemName: "car" ) Text("Car") .font(.caption2) } .padding() } .tint(.red) Button { // } label: { VStack { Image( systemName: "person" ) Text("Person") .font(.caption2) } .padding() } .tint(.blue) Button { } label: { VStack { Image( systemName: "house" ) Text("House") .font(.caption2) } .padding() } .tint(.green) Button { } label: { VStack { Image( systemName: "lightbulb" ) Text("Lightbulb") .font(.caption2) } .padding() } .tint(.indigo) Button { } label: { VStack { Image( systemName: "trash" ) Text("Trash") .font(.caption2) } .padding() } .tint(.purple) } .frame(alignment: .leadingLastTextBaseline) .frame(height: 64) .frame(maxWidth: .infinity) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’25
Reply to Setting Tint Color for Prominent Style UIBarButtonItems at App Level in iOS26
let image1 = UIImage( systemName: "person" ) let barButtonItem1 = UIBarButtonItem.init( image: image1, style: .plain, target: nil, action: nil ) barButtonItem1.tintColor = .systemPink let image2 = UIImage( systemName: "book" ) let barButtonItem2 = UIBarButtonItem.init( image: image2, style: .plain, target: nil, action: nil ) barButtonItem2.tintColor = .systemMint navigationItem.rightBarButtonItems = [ barButtonItem1, flexibleSpace, barButtonItem2 ]
Topic: UI Frameworks SubTopic: UIKit Tags:
Aug ’25
Reply to SwiftUI - Navigation Bar Fails to Switch From Scroll Edge Appearance
You might want to consider implementing a Navigation Bar Appearance ViewModifier and applying it to your VStack struct MainView: View { var body: some View { ScrollView { Text("Text") } .frame(maxWidth: .infinity) } } struct TabBarView: View { var body: some View { Color.pink .frame(maxWidth: .infinity) .frame(height: 55) } } struct ContentView: View { var body: some View { NavigationView { VStack(spacing: 0) { MainView() TabBarView() // Commenting this out fixes the problem. } .background(.red) // Commenting this out _also_ fixes the problem. .opaqueNavigationBar( foregroundColor: .white, backgroundColor: .systemBrown, tintColor: .systemIndigo, shadowColor: .darkGray) .navigationBarTitleDisplayMode(.inline) .navigationTitle("Main View") } } } public struct OpaqueNavigationBarAppearance: ViewModifier { public init( font: UIFont = .preferredFont(forTextStyle: .headline), largeTitleFont: UIFont = .preferredFont(forTextStyle: .largeTitle), foregroundColor: UIColor = .clear, backgroundColor: UIColor = .secondarySystemBackground, tintColor: UIColor = .clear, shadowColor: UIColor = .clear) { let appearance = UINavigationBarAppearance() appearance.configureWithOpaqueBackground() appearance.titleTextAttributes = [.foregroundColor: foregroundColor, .font: font] appearance.largeTitleTextAttributes = [.foregroundColor: foregroundColor, .font: largeTitleFont] appearance.shadowColor = shadowColor appearance.backgroundColor = backgroundColor UINavigationBar.appearance().standardAppearance = appearance UINavigationBar.appearance().scrollEdgeAppearance = appearance UINavigationBar.appearance().compactAppearance = appearance UINavigationBar.appearance().tintColor = tintColor } public func body(content: Content) -> some View { return content } } public extension View { func opaqueNavigationBar( font: UIFont = .preferredFont(forTextStyle: .headline), largeTitleFont: UIFont = .preferredFont(forTextStyle: .largeTitle), foregroundColor: UIColor = .clear, backgroundColor: UIColor = .secondarySystemBackground, tintColor: UIColor = .clear, shadowColor: UIColor = .clear) -> some View { ModifiedContent( content: self, modifier: OpaqueNavigationBarAppearance( font: font, largeTitleFont: largeTitleFont, foregroundColor: foregroundColor, backgroundColor: backgroundColor, tintColor: tintColor, shadowColor: shadowColor)) } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’23
Reply to IOS 16 Issues: Apple's Restrictive Customization Options May Push Users Toward Android
Bye Bye
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to iPhone 6s not showing beta updates
Doesn't look like 6s is compatible with iOS 16. Check this support article
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to Widget background Image not loading IOS 17 Xcode
Here's a sample implementation of containerBackground. LMEntryView is your widget view. struct LMWidget: Widget { var supportedFamilies: [WidgetFamily] { [.systemSmall, .systemMedium] } var body: some WidgetConfiguration { StaticConfiguration(kind: "LMWidget", provider: LMTimelineProvider()) { entry in if #available(iOS 17, *) { LMEntryView(entry: entry) .frame(maxWidth: .infinity, maxHeight: .infinity) .containerBackground(Color("WidgetBackground"), for: .widget) } else { LMEntryView(entry: entry) .frame(maxWidth: .infinity, maxHeight: .infinity) .background(Color("WidgetBackground")) } } .configurationDisplayName("L_M_Widget_Title".localized) .description("L_M_Widget_Description".localized) .supportedFamilies(supportedFamilies) .contentMarginsDisabled() } }
Replies
Boosts
Views
Activity
Jan ’24
Reply to iOS26 bottom toolbars space broken
.toolbar { ToolbarItemGroup(placement: .bottomBar) { GlassEffectContainer { Button { // } label: { VStack { Image( systemName: "car" ) Text("Car") .font(.caption2) } .padding() } .tint(.red) Button { // } label: { VStack { Image( systemName: "person" ) Text("Person") .font(.caption2) } .padding() } .tint(.blue) Button { } label: { VStack { Image( systemName: "house" ) Text("House") .font(.caption2) } .padding() } .tint(.green) Button { } label: { VStack { Image( systemName: "lightbulb" ) Text("Lightbulb") .font(.caption2) } .padding() } .tint(.indigo) Button { } label: { VStack { Image( systemName: "trash" ) Text("Trash") .font(.caption2) } .padding() } .tint(.purple) } .frame(alignment: .leadingLastTextBaseline) .frame(height: 64) .frame(maxWidth: .infinity) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to How to access clear Liquid Glass Effect?
Like this?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to hidesBottomBarWhenPushed in iOS 26
screen recording
Topic: UI Frameworks SubTopic: UIKit
Replies
Boosts
Views
Activity
Jun ’25
Reply to I don't want black background in presented sheet
.sheet(isPresented: $showAddSheet) { AddView() .presentationBackground(yourColor) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’25
Reply to mac os 26 beta 3
It's available now.
Replies
Boosts
Views
Activity
Jul ’25
Reply to UIRequiresFullScreen in iPadOS 26
UIRequiresFullScreen is deprecated, as mentioned in multiple WWDC 25 sessions. Make your UIKit app more flexible, What’s new in UIKit & What’s new in SwiftUI.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jul ’25
Reply to Setting Tint Color for Prominent Style UIBarButtonItems at App Level in iOS26
let image1 = UIImage( systemName: "person" ) let barButtonItem1 = UIBarButtonItem.init( image: image1, style: .plain, target: nil, action: nil ) barButtonItem1.tintColor = .systemPink let image2 = UIImage( systemName: "book" ) let barButtonItem2 = UIBarButtonItem.init( image: image2, style: .plain, target: nil, action: nil ) barButtonItem2.tintColor = .systemMint navigationItem.rightBarButtonItems = [ barButtonItem1, flexibleSpace, barButtonItem2 ]
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Aug ’25
Reply to How to add view below navigation bar to extend scroll edge effect
Try this UIScrollEdgeElementContainerInteraction
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’25