Stop using GeometryReader in SwiftUI

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

КОМЕНТАРІ • 28

  • @FloWritesCode
    @FloWritesCode  5 місяців тому +3

    How will you use this API?

  • @asl-pls-im
    @asl-pls-im 3 місяці тому +1

    Yes... we will stop using GeometryReader maybe in 2 years =)))

  • @Jon88938
    @Jon88938 5 місяців тому +3

    I don’t think this modifier works relative to the parent view like geometry reader does. Instead it works relative to a container which is a window, scroll view or navigation stack

  • @swiftandtips
    @swiftandtips 5 місяців тому +2

    Very useful information! Thanks for sharing Flo! 🙌🏻

  • @максиммартынов-я1ь
    @максиммартынов-я1ь Місяць тому

    nice idea but not usefull when you try to support ios 15-16=(

  • @aMazinglyKeNn
    @aMazinglyKeNn 3 місяці тому +1

    This is a good example! I did learn recently however that although this modifier will work on most things like List and NavigationStack, it does not work on some things like HStack or VStack.

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

    Great!

  • @ScottSmithDev
    @ScottSmithDev 5 місяців тому +1

    Awesome Flo - thank you for the clear demo! I didn't know about his modifier! I'd image I'll use it for all sorts of things, including a custom bottom sheet (when your app doesn't support the SwiftUI iOS version to use detents) combined with ScaledMetric or something. Anyway, thanks again!

    • @FloWritesCode
      @FloWritesCode  5 місяців тому

      Hey Scott! This sounds great, but unfortunately this API was only introduced in iOS 17... So it's not really suitable for you use case :/

  • @CodingSwiftWithNico
    @CodingSwiftWithNico 5 місяців тому +1

    Sehr guter Tipp! Danke fürs zeigen 👍

  • @tylerwatt5651
    @tylerwatt5651 5 місяців тому +1

    Awesome! I'm right in the process of GeoReader and considering a second option. I think this will work! Thank you!

  • @natgenesis5038
    @natgenesis5038 4 місяці тому

    GeometryReader is good for all iOS devices if you wanna keep the same size based screen size

  • @andrejkling3886
    @andrejkling3886 5 місяців тому +1

    Thank you...

  • @rahuljamba5846
    @rahuljamba5846 5 місяців тому +1

    Good tips !!

  • @0xifarouk
    @0xifarouk 5 місяців тому +1

    Maybe this uses GeometryReader behind the scene?

    • @FloWritesCode
      @FloWritesCode  5 місяців тому

      We'll probably never know :/

    • @meowpeow765
      @meowpeow765 4 місяці тому

      Swift is open sourced though :)

    • @FloWritesCode
      @FloWritesCode  4 місяці тому

      @@meowpeow765 Yup, but this is about SwiftUI, which isn't :/

  • @ilyabiltuev
    @ilyabiltuev 5 місяців тому +1

    🔥🔥🔥

  • @ags2099
    @ags2099 4 місяці тому

    Ein tutorial zum thema animationen wäre richtig cool 🎉

    • @FloWritesCode
      @FloWritesCode  4 місяці тому

      Welche Art von Animationen würdest du gerne lernen? .animation, .symbolEffect oder PhaseAnimator?

    • @ags2099
      @ags2099 4 місяці тому

      ⁠@@FloWritesCodeist .animation nicht veraltet? Ansonsten sowohl symboleffect als auch phase wäre ganz cool. Vielleicht als Video Idee für dich "Introduction into Animations"

  • @kamilsuleymanov7197
    @kamilsuleymanov7197 5 місяців тому +10

    Stop using iOS 17 only)

    • @FloWritesCode
      @FloWritesCode  5 місяців тому +4

      Tell Apple to stop shipping SwiftUI updates that aren't backwards-compatible...

    • @aznixqorodok
      @aznixqorodok 5 місяців тому +2

      @@FloWritesCode New title: "Stop using GeometryReader in SwiftUI (iOS 17+)"