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