How to Create a Custom Tab Bar in SwiftUI - Step by Step for Beginners (2023)

Поделиться
HTML-код
  • Опубликовано: 13 окт 2024

Комментарии • 31

  • @silicon_mind
    @silicon_mind Год назад +7

    Great tutorial, thank you!
    If anybody stumbles on the same issue, in my case to make the capsule animation between tabs work, I had to wrap the button action in a withAnimation block:
    Button {
    withAnimation {
    tabSelection = index + 1
    }
    }

  • @SentimentalMo
    @SentimentalMo Год назад +1

    Subscribed. Will watch this in a few hours in the morning.

  • @yugeras
    @yugeras Год назад +1

    Thanks a lot! Nice video and I liked the way you explain without any haste. Most videos from others are as if they are always in a hurry :)

  • @AromaVerma-c1t
    @AromaVerma-c1t Год назад +1

    Thanks a lot! Nice video and I liked the way you explain.

    • @a_swiftly_tilting_planet
      @a_swiftly_tilting_planet  Год назад

      Thank you so much. Hopefully I can be informative and do some live streams during the week of WWDC23.

  • @gregh528
    @gregh528 Год назад +1

    Great tutorial thanks. Love you teaching style.

  • @NineVoltDigitalCinema
    @NineVoltDigitalCinema Год назад +1

    Audio is sounding better! Did you change up your mic placement, or doing some editing in post?

  • @chel.mckayla
    @chel.mckayla Год назад +2

    Great video!! Extremely helpful!!
    Although I was trying to add a different photo to each page, and I'm not quite sure how to do it. I have tried doing it using TabView but it gets rid of all the icons. Any suggestions on how I can fix that?

    • @a_swiftly_tilting_planet
      @a_swiftly_tilting_planet  Год назад +2

      Just make a new SwiftUI View and add it to the ContentView inside the TabView like this:
      TabContentViewOne() // Add a better View name here.
      .tag(1)

  • @comgahanhphuc
    @comgahanhphuc 2 месяца назад +1

    thanks for video 😍

  • @AkimboFennec
    @AkimboFennec Год назад +1

    Custom tabs for sure.

    • @a_swiftly_tilting_planet
      @a_swiftly_tilting_planet  Год назад

      If you like custom tab views this takes a slightly different approach.
      ruclips.net/video/gJyjpyBWAEo/видео.html

  • @CS-gs2eo
    @CS-gs2eo 4 месяца назад

    Nice tutorial! Thank you! I have a small question: what does .tag() mean and work in your code?

  • @gopalakrishnans6192
    @gopalakrishnans6192 8 месяцев назад

    Great video! , if we using custom tabview how we can persist the navigation state because if i switched the bottom tabs the navigation state gets reset

  • @emilrifahi
    @emilrifahi Год назад

    This is really great, using it for a project. However as overlay, I cant hide the customtabbar when I navigate into a nested View.
    Example: HomeView() contains a NavigationView and several different navigation Links
    In my MainView() I have a Tabview than includes HomeView and other views. When I select the Home tab in the tabbar, and then press a navigationLink, I enter a nested View with the overlay (Customtabbar) still still visible.

    • @emilrifahi
      @emilrifahi Год назад

      Would really appreciate feedback/ solutions on how I can hide the overlay of the tabview as well. Thanks!

    • @a_swiftly_tilting_planet
      @a_swiftly_tilting_planet  Год назад

      Sorry for the delay, but hopefully this live stream answers your question.
      Live Coding: Hide Custom TabView in SwiftUI
      ruclips.net/user/livebGSp2kRsawQ?feature=share

  • @vittyfiorentini238
    @vittyfiorentini238 Год назад

    Hi, updating xcode to 14.3 i receive the log "[PipelineLibrary] Mapping the pipeline data cache failed, errno22" when adding the MapView in the viewcontroller. I Receive this error only when i test on a real device not in the simulator. Can i fix it ? Is a common problem? Thanks for the time I appreciate so much.

    • @a_swiftly_tilting_planet
      @a_swiftly_tilting_planet  Год назад

      I haven’t run into this problem, so I’m not sure how I would fix it. Probably check out the Apple Developer forms or stack overflow. See if it’s something others have run into.

  • @TrânBảo-x2k4q
    @TrânBảo-x2k4q Год назад +1

    Can I add 6 items on the tab bar??

    • @a_swiftly_tilting_planet
      @a_swiftly_tilting_planet  Год назад +1

      Building out a custom tab bar would allow you to put as many that can fit on screen, or if you really wanted to you could make a scrolling tab bar.