Skip to content

leonardsangoroh/NavigationBar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Navigation Bar

Through this project, I have learnt how to programmatically build a navigation bar and its main components

YouTube Link (for the tutorial)

https://www.youtube.com/watch?v=wcN3-E1_ZxU&t=2s

iOS Version

This NavigationBar was built and run on iOS 15.0

Initial setup

  1. Go to info

    • Select 'Main storyboard file base name'
    • Delete it
  2. Go to Application Scene Manifest

    • Open it up until you get to 'Storyboard Name'
    • Delete it
  3. Go to Xcode sidebar

    • Delete the main storyboard 'main'
  4. Go to the 'SceneDelegate' file, inside the scene function, remove the existing and copy paste the following code;

     guard let windowScene = (scene as? UIWindowScene) else {return}
     let window = UIWindow(windowScene: windowScene)
     
     let vc = ViewController()
     let nav = UINavigationController(rootViewController: vc)
     
     window.rootViewController = nav
     
     self.window = window
     self.window?.makeKeyAndVisible()
    

Screenshot(s)

Screenshot 1 - Added the Navigation Controller

Screenshot 2023-12-29 at 11 50 54

Screenshot 2 - Added Navigation Buttons

Screenshot 2023-12-29 at 12 27 13

Screenshot 3 - Added Second Controller

Screenshot 2023-12-29 at 12 49 57

Screenshot 4 - Set NavBar Attributes (ViewController)

Screenshot 2023-12-29 at 13 34 51

Screenshot 5 - Set NavBar Attributes (SecondController)

Screenshot 2023-12-29 at 13 34 56

Screenshot 6 - Modified the 'Back' Button

Screenshot 2023-12-29 at 13 47 57

About

UINavigationController made programmatically.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages