First of all: I'm using Swift 5 with Xcode 10 (iOS 12.0).
I'm pretty new to Swift/iOS development and watched a couple of videos on how to add a "back" button to the navigation bar. In all of them (with Swift 3) the button just magically appears once the app is run after adding a segue (between an item in the first scene and the second scene) and a title for both navigation bars.
My app has three ViewControllers/scenes:
- Login without navigation bar ("login" button: segue to scene 2)
- Table View (linked to scene 3 with segue, so I can just tap on an item in the list)
- Further information for a single item in the Table View
The segue between scene 2 and 3 is set to "show (e.g. push)" because "push" is deprecated and crashes the app.
I added both navigation bars to the navigation controllers (2 & 3) by hand and want to add an arrow icon to the navigation bar of scene 3. What I've tried so far:
- Add titles for the navigation bar in both scenes
- Set the "Back button" attribute (Navigation bar text), which created a child object
- Then set the child object's "Image" attribute
- Set the "Back" and "Back Mask" attribute (Navigation bar) to the same image
Nothing shows up though, neither in Xcode nor in the simulator (not even the image).
Is it even still possible to get an automatic "back" button or do you now have to add it yourself using a "Bar Button Item"?