Post

Replies

Boosts

Views

Activity

SwiftUI iOS18 Bug: 'contextMenu' does not recognize 'scaleEffect' and similar outside of 'ScrollView' parent
The Issue I am building a MessageChannelView, I take most advantage of all ScrollView mechanics by flipping it on it's head with .scaleEffect(y: -1), and then the content inside of it again with .scaleEffect(y: -1), so the content is back to normal. Putting .contextMenu() on any of the elements flipped back to normality will cause an ugly bug on iOS18, but not on iOS17. This is because .contextMenu() on iOS18 does not recognize the .scaleEffect(y: -1) outside of it's ScrollView parent. Minimal Replication 1.) Create any View with SwiftUI similar to this: ScrollViewReader { scrollView in ScrollView { VStack { Text("Test!") .contextMenu { Button(action: {}) { Label("Copy Link", systemImage: "doc.on.doc") } } } .scaleEffect(y: -1) } .scaleEffect(y: -1) } 2.) Run on a physical device with iOS18 More I tested this on three different physical iPhone devices, iOS16, iOS17 and my main device iOS18. The bug only exists on iOS18.
1
1
244
Oct ’24