iOS Swift Tutorial: Pull to Refresh with SwiftUI and UIViewRepresentable (2020) | Brian Advent

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

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

  • @teamspirit6400
    @teamspirit6400 4 года назад +2

    Thank you! Waiting for the live stream

  • @KK-pq6lu
    @KK-pq6lu 4 года назад +1

    Brian, great as always. This particular code would be perfect to make a corresponding video where you convert this code to use generics. I think with this particular use case, converting it would go along way to helping generics “sink in”

  • @IonWP
    @IonWP 4 года назад

    Hello. So amazing. Which MacBook you have ?

  • @nursultanaskarbekuly4032
    @nursultanaskarbekuly4032 3 года назад +2

    crazy that we have to write so much code for a simple pull to refresh functionality

    • @AhmdIsmail
      @AhmdIsmail 2 года назад

      Well, in iOS 15 you can just use .refreshable(action:) List modifier but there's two things to consider:
      1. your app should make use of async await so you can pass a closure with await statement to the action: parameter so the refresh control would know when to end refreshing.
      2. this is not supported in iOS 14 and earlier and that's why I'm here watching this video 😁

    • @AlexCopter33
      @AlexCopter33 2 года назад

      ​@@AhmdIsmail 3. and .refreshable can't be customized for voiceover users, you hear "rose" during refresh.

  • @thucpham2211
    @thucpham2211 3 года назад

    Do you mind explain how does it work with async data? Sorry the reason I ask is because I got an issue with Pull To Refresh in Large Title

  • @bartjuhh12
    @bartjuhh12 4 года назад +1

    I have two questions:
    - It doesn't seem to work without the NavigationView inside the GeometryReader. Why is that? I already have a root NavigationView elsewhere.
    - Does this support programmatic refresh?

  • @GoeHybrid
    @GoeHybrid 3 года назад +4

    Shipping swiftui with scrollview, which doesn't have a pull to refresh functionality is like having a car without an engine. Apple being a hot garbage once again.

  • @andykotov-dev
    @andykotov-dev 3 года назад

    and if I don't need the list as a data display, your frame won't work correctly

  • @goncalocgaspar
    @goncalocgaspar 3 года назад +1

    This only works if data is synchronized....

  • @TheHiHiker
    @TheHiHiker 4 года назад

    How do you launch the second UI ?