Thanks for the question, interesting you want that spacing but you can use standard SwiftUI you can create a padding inside each view to the edge:
ArrangementView {
PrimaryView()
.padding(.trailing, 16) // Creates the gap
Is that what you want instead of letting ArrangementView do the work for you?
I would suggest to play with it inside the view and add padding or changing the frame with and height:
ArrangementView {
Text("Primary")
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(.blue.opacity(0.2), in: .rect(cornerRadius: 12))
} secondary: {
Text("Secondary")
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(.green.opacity(0.2), in: .rect(cornerRadius: 12))
}
You can play with the arrangementViewStyle as well to find something that works for you:
ArrangementView {
PlayerControls()
} secondary: {
VideoPlayer()
}
.arrangementViewStyle(.overlay)
https://developer.apple.com/documentation/swiftui/arrangementview
Hope this helps, I would suggest to make sure the ArrangementViews are padded well in all positions and views as the device can display those differently depending on the position.
Albert WWDR