I'm attempting to have a NavigationLink
load a view from the bottom of the screen instead of transitioning from the right, but the "obvious" approach (using a .transition(.move(edge: .bottom))
) doesn't seem to be having any effect.
The below is inside a NavigationView
:
List {
ForEach(self.message, id: \.self) { message in
HStack(alignment: .center) {
MessageListCell(....)
}
}
}
and MessageListCell
:
var body: some View {
HStack {
VStack(alignment: .leading, spacing: 0) {
Text(person.firstName).lineLimit(1)
.foregroundColor(.main)
}
Spacer()
NavigationLink(destination: MessageDetail(otherPerson: otherPerson,
subject: subject,
profileHandler: { ProfileReducer($0) })
.transition(.move(edge: .bottom)),
tag: 1, selection: $action) {
NextButton("Proceed")
}
}
}
Tapping the NextButton
consistently transitions from the right side of the screen instead of the bottom. I've tried variations on the above but I'm starting to think that transition
might not be the right approach.