Deep Dive into TabView Changes in iOS18

Поділитися
Вставка
  • Опубліковано 18 лис 2024

КОМЕНТАРІ • 28

  • @andrejkling3886
    @andrejkling3886 Місяць тому +1

    Next excellent lesson… special thanks for example in real project 🔥💯❤️

  • @chrismcnabb797
    @chrismcnabb797 Місяць тому +1

    Thank you! I was searching for this exact tutorial! 🎉

  • @KristenSwanson
    @KristenSwanson 22 дні тому

    Super helpful, thank you! Do you have a recommendation about using a Navigation Stack with a TabView on iPad now? (Now that the tab bar is only at the top on iPad, the “back” being at the top when you’re within a stack of a tab seems confusing.)

  • @swiftodyssey
    @swiftodyssey Місяць тому +1

    Awesome video, thank you Stewart!

  • @santhoshVnair
    @santhoshVnair 3 місяці тому

    This is an excellent and insightful video with comprehensive coverage on the possibilities of Tabview coming to iOS 18. It looks like lines are blurring between NavigationStack and TabView. Thanks Steve, exceptional as usual.

  • @MarkMcBride-q4r
    @MarkMcBride-q4r Місяць тому

    Great video. You're timing was just right for me. One follow-up question. Is there an approach whereby you can create the tabs dynamically using Swift data and still make the sidebar customizable?

    • @StewartLynch
      @StewartLynch  Місяць тому

      You cannot dynamically add new views for the tabs

    • @MarkMcBride-q4r
      @MarkMcBride-q4r Місяць тому

      @@StewartLynch Thanks. You really do a great job in these videos.

  • @dirkfu6280
    @dirkfu6280 Місяць тому

    Enabling „Requires fullscreen“, to fix the crash prevents using your app in multitasking though!

    • @Scionwest
      @Scionwest Місяць тому

      Are there alternative solutions other than “requires full screen”?

  • @OGLerma
    @OGLerma Місяць тому

    Extremely helpful video !

  • @gerardgomez5987
    @gerardgomez5987 2 місяці тому

    Let me just start by saying your videos are amazing. The attention to detail is phenomenal. I learned so much. In regard to the TabView, if there's currently a way to hide TabSection headers in the TabBar view while keeping them visible in the Sidebar view, and more importantly, while still showing the tabs themselves in the TabBar. To be more clear I have a section and within those sections I have tabs. In sidebar view I can see the section and its Tabs, in the TabView I can only see the section or the first tab. Now is there a way to hide the section in the TabView and only shows its tabs?

    • @StewartLynch
      @StewartLynch  2 місяці тому

      You can hide a section from the Tab View, using .tabPlacement(.sidebarOnly)
      However, you cannot show the individual tabs by default.
      However, in the sidebar, when the user taps on one of the tabs in the section, it will appear on the tab bar after that.
      What you could do is set the tabPlacement for each of the items in the section as .pinned, but this will pin them to the end of the tab bar and only show the icon.

  • @Tachoisdabest
    @Tachoisdabest Місяць тому

    Thank you for the video Stewart!! One question: how do you do a custom header at the top of each file? Do you do this manually or otherwise?

    • @StewartLynch
      @StewartLynch  Місяць тому +1

      I cover this in this video: ua-cam.com/video/RACepNDGNyk/v-deo.html

    • @Tachoisdabest
      @Tachoisdabest Місяць тому

      @@StewartLynch thank you! 🤙🏾

  • @manmandangdang
    @manmandangdang Місяць тому

    Thank you very much! If I want to make TabSection closed by default, how can I achieve it?

    • @StewartLynch
      @StewartLynch  Місяць тому

      I have not found a way to do that. You can remove the sidebar altogether by using .tabViewStyle(.tabBarOnly)
      , but you do not get the option to bring it back

  • @Soh965
    @Soh965 Місяць тому +1

    Bruh… transferable is incredible…

  • @danstutorials3904
    @danstutorials3904 2 дні тому

    NOT WORKING:
    TabView(selection: $currentTab) {
    if #available(iOS 18.0, *) {
    Tab("Installed fonts", systemImage: "signature") {
    Text("Hello")
    }
    } else {
    // Fallback on earlier versions
    }
    }
    It says that "'buildExpression' is unavailable: this expression does not conform to 'View'"

    • @StewartLynch
      @StewartLynch  2 дні тому

      You are mixing two different initializers so this won’t work. Bring the if #available outside the TabView. In iOS 18 the selection is set by a value not a tag.
      @State private var currentTab = 0
      var body: some View {
      if #available(iOS 18.0, *) {
      TabView(selection: $currentTab) {
      Tab("Installed fonts", systemImage: "signature", value: 0) {
      Text("Hello")
      }
      }
      } else {
      TabView(selection: $currentTab) {
      Text("Hello")
      .tabItem {
      Label("Installed fonts", systemImage: "signature")
      }
      .tag(0)
      }
      }
      }

  • @KiriKiriKiki
    @KiriKiriKiki Місяць тому

    thanks

  • @andremethot2787
    @andremethot2787 3 місяці тому

    Great video. I’ve learned a lot