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?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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