When does SwiftUI View Re-Render?

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 พ.ย. 2024

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

  • @hammad0
    @hammad0 2 ปีที่แล้ว

    know where to start a new soft and I didn't know how to switch from soft to . You are the best THANK YOU FOR NOT

  • @shivanshkumar1134
    @shivanshkumar1134 ปีที่แล้ว

    Really helpful video to understand the rendering process of Views based on State changes

  • @priceringo1756
    @priceringo1756 2 ปีที่แล้ว

    Great use of Instruments to really nail down the point.

  • @jarektrojanowicz
    @jarektrojanowicz 2 ปีที่แล้ว +2

    Ok. It’s clear. Thanks. Could you please do similar experiment with UIViewControllerRepresentable? Some time ago I noticed that it behaves differently, meaning that it is being rendered when it is evaluated. Can you please confirm or deny it?

  • @EmanNollase
    @EmanNollase 2 ปีที่แล้ว +1

    ..similar to jetpack compose recomposition, it only recompose the component that state changes

  • @pavanmanjani7583
    @pavanmanjani7583 2 ปีที่แล้ว

    Superb 👌

  • @saurabh9446
    @saurabh9446 2 ปีที่แล้ว

    Need more of instruments 🔥🔥

  • @ramunas_
    @ramunas_ ปีที่แล้ว

    Thanks for good tutorial. I am getting problem, which says: ImmersiveScene: @self changed. How to investigate why did it happen?

  • @hungwaikay7747
    @hungwaikay7747 10 หลายเดือนก่อน

    If the textfield is multilined,
    And asyncimage url don't depend on textfield(name),
    Will image need re-render when input to textfield such that it switched from 1 line to 2 lines expanding the total height of UI?

  • @indiekiduk
    @indiekiduk 2 ปีที่แล้ว

    When the data passed into AsyncImage is different from last time, it's body is re-evaulated the same way as ContentView's body is re-evaluated when @State changes. i.e. body is called when a let or a state var is different from last time. I wouldn't call this re-rendering because that term is better suited to after SwiftUI diffs the body evaulations and uses the result to create/update UIView objects which then CoreGraphics renders to screen, e.g. in the drawRect method.

    • @azamsharp
      @azamsharp  2 ปีที่แล้ว

      Yes. That is what I explained in the video.