How to Nav Bar Programmatically (Swift 2023, UIKit, Xcode)

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ม.ค. 2025

ความคิดเห็น • 29

  • @Brosales1414
    @Brosales1414 9 หลายเดือนก่อน +1

    Thank you for doing UIKit seems most video are all about swiftui these days!

  • @MCmonarcha
    @MCmonarcha ปีที่แล้ว +1

    Appreciate the work, your tutorials are one of the most helpful I've found. Keep it up!

  • @qyrgyzca
    @qyrgyzca ปีที่แล้ว +2

    It's an awesome work! Keep it up!

    • @Codebrah
      @Codebrah  ปีที่แล้ว

      Thanks a lot!

  • @gouthamganesan9565
    @gouthamganesan9565 11 หลายเดือนก่อน

    Have you explained anywhere about why to delete those entries that you did at the starting?

  • @icer1798
    @icer1798 ปีที่แล้ว

    Thank you for video. But how to add logo to secondviewcontroller's large title? Near the "Second Controller" title?

  • @juancamilofonseca424
    @juancamilofonseca424 ปีที่แล้ว

    gracias bro, excelente video

  • @angelicaboutwellrodriguezp540
    @angelicaboutwellrodriguezp540 10 หลายเดือนก่อน

    Hello, I'm new to XCode and Swift. If I already have an app started, but didn't use Storyboard, can I still follow this tutorial?

  • @kemalguler427
    @kemalguler427 10 หลายเดือนก่อน

    youre amazing bro where are you nowadays

  • @rparham1997
    @rparham1997 ปีที่แล้ว +1

    Can you do a tutorial on UI and Unit testing in iOS?

  • @Codebrah
    @Codebrah  ปีที่แล้ว

    Hey guys, make sure you are setting the code exactly how I do in the SceneDelegate (not AppDelegate) and you are NOT creating the "required init?(coder aDecoder: NSCoder)" method in your ViewControllers.
    If you guys have any errors, try to upload your code to github and paste any console error messages so I can see what is wrong.
    Also, newer iOS version nav bars are invisible when they start out so try setting the "self.navigationItem.title" and see if it shows up.

  • @vishelpodishat
    @vishelpodishat ปีที่แล้ว +1

    bro i have problem, with navbar when i connect with my roottviewcontroller and i press run, nothing happened.i can't see any nav bar

  • @awesomecuber1222
    @awesomecuber1222 ปีที่แล้ว

    could you make a video on deploying ios apps that have a nodejs backend

    • @Codebrah
      @Codebrah  ปีที่แล้ว

      Here is a couple of series I did on API calls. One of them is quite long though. Whatever backend you use (like NodeJS) doesn't really made a difference on how you deploy the actual iOS app. Just the code you write in that app.
      th-cam.com/play/PLWOgAHhZbsIEh3dgGno4CPPsVcb4QUFy7.html
      th-cam.com/play/PLWOgAHhZbsIEQSJ1sg9AP1t-u6UWyFmZb.html

  • @fattoofittoo7907
    @fattoofittoo7907 ปีที่แล้ว

    @CodeBrah did xcode update how to setup scene delegate for programmatic UI, i try the old one, its keep asking " Missing argument for parameter 'coder' in call"

    • @Codebrah
      @Codebrah  ปีที่แล้ว

      I dont think so. Can you paste your scene delgate code and also the init function for your view controller, if you made one?
      Sound like a viewcontroller initalizer issue.

    • @Codebrah
      @Codebrah  ปีที่แล้ว

      Try adding this to your ViewController:
      init() {
      super.init(nibName: nil, bundle: nil)
      }
      And make sure you DONT have this function:
      required init?(coder aDecoder: NSCoder) {
      fatalError("init(coder:) has not been implemented")
      }

    • @fattoofittoo7907
      @fattoofittoo7907 ปีที่แล้ว

      thank you, it worked

  • @s.tunahanustuntepe2966
    @s.tunahanustuntepe2966 8 หลายเดือนก่อน

    How do we need to do it for IOS 11 and above?

  • @calebgates2307
    @calebgates2307 ปีที่แล้ว

    Same here. The navigation bar doesn't show. Something is wrong... either with your code or with my XCode

    • @Codebrah
      @Codebrah  ปีที่แล้ว

      What iOS Simulator are you using? Maybe thats the problem

    • @Codebrah
      @Codebrah  ปีที่แล้ว

      Also if u put on github and send link here I can look

  • @akeemyusuf8459
    @akeemyusuf8459 ปีที่แล้ว

    Hi @CodeBrah , my navigation bar isn't showing

    • @Codebrah
      @Codebrah  ปีที่แล้ว

      Can you reply here with all the code in your SceneDelegate function where u setup the UIWindow?

    • @akeemyusuf8459
      @akeemyusuf8459 ปีที่แล้ว

      @@Codebrah
      func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) {
      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()
      }
      Here's the code.

    • @Codebrah
      @Codebrah  ปีที่แล้ว +1

      @@akeemyusuf8459 Super late reply. But it looks like you're trying to set it in the AppDelege instead of the SceneDelegate.