Post

Replies

Boosts

Views

Activity

Reply to ScrollView content ignores taps near UIViewControllerRepresentable
Here's another example that I hope illustrates the issue more clearly. ZStack { MyRepresentable() ScrollView { VStack { ForEach(1...10, id: \.self) { index in Button { print("Tapped \(index)") } label: { Text("Button \(index)") } .buttonStyle(.borderedProminent) } } } .border(.black) } Using a ZStack, we place a ScrollView on top of a UIViewControllerRepresentable. We then fill the ScrollView with Button views (as .borderedProminent). Please tap any of those buttons right on their leading or trailing edges. Nothing happens. There's a dead-zone about 10-points wide on the leading and trailing edge of each button. So you have to move your cursor or finger about 10 points into the button surface before the tap is recognized. Now comment-out the UIViewControllerRepresentable. The buttons suddenly work as expected - even recognizing taps well outside their frames. I'd love if anyone can shed some light on this. And if there's some silly mistake I'm making when initializing the UIViewControllerRepresentable, then apologies in advance. That's par for the course with me :)
Aug ’24
Reply to StoreKit's manageSubscriptionsSheet view modifier not loading
Hi all, As a late follow up to this, we did get rejected due to StoreKit's manageSubscriptionsSheet view modifier not working. It sounds like this is still happening to some. As an alternative, we followed this documentation from Apple which describes the URL you can open from within your app to allow users to manage their subscriptions. So in our case, we just included a button similar to this: Button { guard let url = URL(string: "https://apps.apple.com/account/subscriptions") else { return } UIApplication.shared.open(url, options: [:]) } label: { Label("Manage Subscriptions", systemImage: "crown") } Our app then passed review.
Aug ’24