How to get a view size in SwiftUI

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

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

  • @SørenGregersen-e8e
    @SørenGregersen-e8e Год назад +2

    Super useful! Thanks for sharing the tip. I think I'm going to copy your extension and then perhaps use a @Binding instead of having the closure.

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

    Very neatly done. I like the way you tidied it up in that modifier

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

    First of all, thanks for sharing this content @Mike.
    Second, I did the same thing on my project, but there I am using a List, not a ScrollView, and my button actually are two buttons inside a VStack. I am using a GeometryReader on this two buttons VStack but when I add the variable to the List .padding modifier my buttons VStack creates a weird white stripe behind, starting in the middle of the buttons VStack and going to the bottom. Have you got this behavior?

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

      Not sure if I got this 🤔 Could you share a sample code?

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

      @@mikemikina Yes! How can share with you?

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

      You can create a Gist on GitHub or a regular repo. If you don't want to make it public, you can just add me to this repo. My GitHub handle is: "mikina."

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

      @@mikemikina It is the file pinned on my home page of GitHub. Sao Judas Tadeu Americana/Views/PrayersViews/NovenaView.swift, that's the file

  • @obrienserhii
    @obrienserhii 7 месяцев назад

    thanks!!!

  • @victorriurean
    @victorriurean 9 месяцев назад

    🔥