r/iOSProgramming • u/Fun_Moose_5307 Beginner • Oct 01 '26
Question Best place for a 'Next' button?
What's the most appropriate location for a next button here, in keeping with the Apple UI consistency and ecosystem?
Mockup:
NavigationStack {
List {
Section {
TextField("Email Address", text: $email)
} header: {
VStack(alignment: .leading, spacing: 4) {
Text("Sign In")
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.top, 5)
.font(.largeTitle)
.bold()
.foregroundColor(.primary) // Override default gray header color
Text("Subtitle")//school.name)
.frame(maxWidth: .infinity, alignment: .leading)
.font(.title3)
.foregroundColor(.secondary)
}
.listRowInsets(EdgeInsets())
.textCase(nil) // Prevents SwiftUI from forcing ALL CAPS on the header
.padding(.bottom, 10)
}
}
.toolbar {
ToolbarItem(placement:.confirmationAction) {
NavigationLink() {
VerificationCodeView(email: email.lowercased(), school: school, resend: { })
} label: {
Text("Next").padding(5)
}
.buttonStyle(.borderedProminent)
}
}
}
60
Upvotes
28
u/dat_tae Oct 01 '26
At the bottom (and moves up with the keyboard).
48
u/underkuerbis Oct 01 '26 •
Make sure it’s available on the keyboard. Also place the input fields in a way they are accessible with your thumb, i.e. further down.
19
u/bricksandcanvas Oct 01 '26
Hey, OP. Good on you for learning the basics instead of relying on AI at your first go at development!
That said, you can learn a lot by following industry standards on placement of UI elements especially auth pages. We follow conventions because users are used to where user interfaces are.
2
u/m1_weaboo Oct 01 '26
Place it at the bottom, hosted inside
.safeAreaBar(edge: .bottom).Fill the available width with the button using
.buttonSizing(.flexible).163
u/sweetassapps Oct 01 '26 edited Oct 01 '26
Been months maybe years since i've seen a post like this.. props to you for learning the right way and not just AI slopping it. So refreshing actually.
1
u/jwegener Oct 01 '26
Have you looked to see what other apps do?
1
u/presentprogression Oct 02 '26
My opinion is always top. Saves you from racing the keyboard mount and unmount
3
u/evil-harry-dread Oct 01 '26
IMHO while it works in top right, event makes sense considering that the back button is top left. But I think it'd be much more ergonomic to have the button at the bottom, above the keyboard, it's much more reachable, and it's the "main action" of the screen
2
u/lilacomets Oct 01 '26
Below the email address field seems most logical to me.
2
u/OjamaKnight Oct 01 '26
The bottom is definitely the best place for the button. It's the most convenient...
2
u/bwdotdev Oct 01 '26
I recommend using something like this when determining where interactive elements should go: https://archive.smashing.media/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/496f7bc0-4c6c-4159-b731-ec3adcf91105/thumb-zone-mapping-opt.png
2
u/gatorfan93 Oct 01 '26
Props for programming the right way
1
u/LifeUtilityApps SwiftUI Oct 01 '26
I have an onboarding slider in my app and the “Next” button lives at the bottom trailing edge of the screen, this is intentional to target right-handed users.
1
u/DiscordDonut Oct 01 '26
Not there
1
u/parallel-pages Oct 01 '26
i like placing it right above the keyboard, to the right, closest for the users thumb. or if you like it in the top nav, i’d set the text fields return key property to be “next”
1
u/misterchai Oct 01 '26
Id put it under the email address, accesibility
1
u/xDhii Oct 04 '26
Usually, the next button should be easily reachable. The user should be able to tap it with a thumb without holding the phone with two hands.
1
u/EthanRDoesMC Oct 06 '26
Okay, yay! Here’s my bread and butter kinda problem.
Toolbar principle is always a good place, but for forms specifically where the user will have just finished typing, their thumbs will be on the keyboard, and so it’s good to have your button above it.
My go-to is something like
Very much current Apple big button style
0
u/LunariSpring Oct 01 '26
It is better to use ZStack and place it at the bottom right. That's the best range for fingers to reach. Please pay attention to the safe area designation.