Post

Replies

Boosts

Views

Activity

How to add a button on top of sheet?
Hi, I have created this UI using custom view and not a real sheet component. But the animations and interaction is not as smooth. Earlier I was using sheet component and it was working very well, but then I had a need to add a search button on top of sheet (not inside, that is very important). And so I created this whole sheet with custom view and not the sheet component. But it resulted in loss of fluid working and animations that sheet have. Including changing between Medium detent and Large detent. Is it possible to achieve this UI with native sheet component? Or using some other native swiftui view which will have good animation that sheet has?
0
0
51
1d
Image not rendering on some devices
Hi, new developer here. I have an issue where an image I have on app is not showing up on some devices. The image is: Resources/Assets/logo: I am using it in my app like: ZStack { Color.white .ignoresSafeArea() VStack { Spacer() Image("logo") Spacer() Text(dateString) .font(.custom("LinLibertine", size: 17)) .fontWeight(.bold) .tracking(5) .padding(.bottom, 50) } } The image appears fine on all simulators. And also on my real device iPad with A14. But when I run it on iPhone 8 or iPad Air M4, it shows empty space in place of image. I tried many different options like: Image("logo") .renderingMode(.original) .resizable() .scaledToFit() frame(width: 300) .background(Color.red.opacity(0.3)) But nothing works. What can be the issue?
2
1
132
Feb ’26
Button in ToolbarItem is not completely tapable on iOS 26
I have an icon button in toolbar but only the icon is triggering tap events while outside icon button gives tap feedback but event is not firing. Code: ToolbarItem(placement: .navigationBarTrailing) { Button(action: toggleBookmark) { Image(systemName: isBookmarked ? "bookmark.fill" : "bookmark") .resizable() .aspectRatio(0.8, contentMode: .fit) .frame(width: 20, height: 20) } } Here toggleBookmark function is only called if I click on Image but not if I click outside image but on the circular button that appears on iOS 26. See this screen recording.
Topic: UI Frameworks SubTopic: SwiftUI
8
2
349
2w
How to add a button on top of sheet?
Hi, I have created this UI using custom view and not a real sheet component. But the animations and interaction is not as smooth. Earlier I was using sheet component and it was working very well, but then I had a need to add a search button on top of sheet (not inside, that is very important). And so I created this whole sheet with custom view and not the sheet component. But it resulted in loss of fluid working and animations that sheet have. Including changing between Medium detent and Large detent. Is it possible to achieve this UI with native sheet component? Or using some other native swiftui view which will have good animation that sheet has?
Replies
0
Boosts
0
Views
51
Activity
1d
Image not rendering on some devices
Hi, new developer here. I have an issue where an image I have on app is not showing up on some devices. The image is: Resources/Assets/logo: I am using it in my app like: ZStack { Color.white .ignoresSafeArea() VStack { Spacer() Image("logo") Spacer() Text(dateString) .font(.custom("LinLibertine", size: 17)) .fontWeight(.bold) .tracking(5) .padding(.bottom, 50) } } The image appears fine on all simulators. And also on my real device iPad with A14. But when I run it on iPhone 8 or iPad Air M4, it shows empty space in place of image. I tried many different options like: Image("logo") .renderingMode(.original) .resizable() .scaledToFit() frame(width: 300) .background(Color.red.opacity(0.3)) But nothing works. What can be the issue?
Replies
2
Boosts
1
Views
132
Activity
Feb ’26
Button in ToolbarItem is not completely tapable on iOS 26
I have an icon button in toolbar but only the icon is triggering tap events while outside icon button gives tap feedback but event is not firing. Code: ToolbarItem(placement: .navigationBarTrailing) { Button(action: toggleBookmark) { Image(systemName: isBookmarked ? "bookmark.fill" : "bookmark") .resizable() .aspectRatio(0.8, contentMode: .fit) .frame(width: 20, height: 20) } } Here toggleBookmark function is only called if I click on Image but not if I click outside image but on the circular button that appears on iOS 26. See this screen recording.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
8
Boosts
2
Views
349
Activity
2w