Interactive Tab Bar | SwiftUI

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

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

  • @realGarlicSalt
    @realGarlicSalt 2 วันที่ผ่านมา

    How would you adjust this to add more than 4 buttons/horizontal scrolling behavior?

  • @studiosss3010
    @studiosss3010 7 วันที่ผ่านมา

    The music is good 👍

  • @junfly
    @junfly 17 วันที่ผ่านมา

    nice!

  • @m3zish
    @m3zish 13 วันที่ผ่านมา

    That's very nice, I like the capsule version better. However, I have issues adapting your code to my needs and probably many others. In these demos, you always keep it simple and each view is just a simple text in the middle of the view. In real life, most of us have actual views, that are named file, also using SwiftData and these views need to pass data too. I'm pretty sure I need a ViewBuilder inside my enum, but a enum cannot store properties, so how do I pass data from the tabview to the view that I actually want to display? Knowing that not all view will need the pass the same amount of data. Thank you :)

    •  12 วันที่ผ่านมา

      I haven't watched the video yet, I'm trying to thinking ideas for the question you asked, you can write a general manager of swiftData and fetch the data with each tab change.

    • @m3zish
      @m3zish 11 วันที่ผ่านมา

      You'll have to be more specific here :) I dabble in coding, but not very familiar with naming conventions and things like that. In my Enum, I added that:
      @ViewBuilder
      var view: some View {
      switch self {
      case .home:
      NavigationView { HomeView(items: [Item], settings: [Settings], modelContext: ModelContext) }
      case .charts:
      NavigationView { GraphsView() }
      case .settings:
      NavigationView { SettingsView(modelContext: ModelContext) }
      }
      }
      I just don't know if this is the right way to do it, if there is another way, or how to tell, in the Enum, how to retrieve that data. All I know is that when using NavigationView { HomeView() }, the code complains that it needs arguments parameters.

  • @iliasmerigh9650
    @iliasmerigh9650 18 วันที่ผ่านมา

    Can you do a DatePicker with week scope (single line) ?

    • @HolyAvgr
      @HolyAvgr 18 วันที่ผ่านมา

      No joke, can't you just ask ChatGPT for something like that?

    • @iliasmerigh9650
      @iliasmerigh9650 18 วันที่ผ่านมา

      @ Yeah but the UX is not as clean as Kavsoft’s one. For example ChatGPT gives a solution with tabviews which makes the scroll not infinite

    • @Kavsoft
      @Kavsoft  18 วันที่ผ่านมา

      I believe you need a week slider with infinite paging and sliding ability. I already have a video on that. Please check it out,
      th-cam.com/video/sbheMzA3jTI/w-d-xo.html

  • @vivienhounsounou1867
    @vivienhounsounou1867 18 วันที่ผ่านมา

    you sure you can't increase x-code font size?