I noticed that some of the built-in playgrounds have a file called LearningTrail.xml, with contents that look like this:
?xml version="1.0" encoding="UTF-8"?
trail version="1.1" name="0103"
steps
step type="context"
blocks
block type="title"
title id="MfZ-Gx-dNg"What’s An Action?/title
/block
block type="image" source="content-whats-an-action" height="0.75"
description id="AcK-pe-jkX"A snail with four circles above it, showing the snail can scale, move forward and back, rotate, and fade in and out./description
/block
block type="text"
text id="jYg-QZ-KMx"In addition to animations, you can also scale, move, rotate, and fade your models using actions./text
/block
block type="buttons" alignment="trailing"
button href="@nextStep" symbol="arrow.right.circle.fill"
text id="BMD-jU-Xiz"Ready?/text
/button
/block
/blocks
/step
... lots more
The result looks like this: image link - https://github.com/aheze/DeveloperAssets/blob/master/IMG_5DAB4F43BA78-1.jpeg
I can't find any documentation on this... will this be considered a private API? Are we allowed to make our own LearningTrail for our Swift Student Challenge submission?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have a DragGesture set up like this:
let drag = DragGesture(minimumDistance: 0)
.onChanged { _ in
print("changed")
}
.onEnded { _ in
		print("ended")
}
content.gesture(drag) /// content is the View that I'm adding the gesture to
This works fine with just one finger. However, once I press down with a second finger, .onEnded is never called.
Is there a way to allow only one finger for the gesture?
I've seen similar issues here - https://stackoverflow.com/questions/60253490/swiftui-detect-draggesture-cancellation-when-ipad-dock-is-pulled-up and here - https://stackoverflow.com/questions/58807357/detect-draggesture-cancelation-in-swiftui, but they didn't work for me.