Posts

Post not yet marked as solved
7 Replies
Please file a radar on this! This is a very common use case, and it shouldn't be as confusing as it is...You should be able to get this working using an extremely long minimumDuration and using the "pressing:" parameter on the longPressAction:myView.longPressAction(minimumDuration: 100000, maximumDistance: 100, { print("Action: this is called when pressed for the duration") }, pressing: {pressed in print("This is called when the press starts/stops")})Put your coloring code in a closure you add to the pressing: parameter...
Post not yet marked as solved
1 Replies
RoundedRect(cornerRadius: 8.0)https://developer.apple.com/documentation/swiftui/drawing_and_animation
Post not yet marked as solved
7 Replies
I belive you want a combination of `LongPressGesture` (with the minimum press duration set to zero) and `onEnded` to know when the press has ended...https://developer.apple.com/documentation/swiftui/longpressgesturehttps://developer.apple.com/documentation/swiftui/gestures/adding_interactivity_with_gestures
Post not yet marked as solved
6 Replies
Thanks for the reply.I can get enumerated() to work fine with normal for loops, the problem comes when I am trying to use it with SwiftUI's ForEach object (normal for loops don't work with SwiftUI yet)
Post not yet marked as solved
5 Replies
Replied In Style a List
I believe .listStyle() currently takes a value of .default, .plain, or .grouped.I am also trying to find a way to hide the divider lines. I suppose I can use an HStack with a ForEach, but I am not sure of the performance implications of that with a long list. List seems like the right tool for the job, but we currently don't seem to have access to the right knobs to actually customize it. Hopefully that will change in the next couple of betas...