Fixing iOS 17+ breaking changes: UIRefreshControl, viewIsAppearing & testability | iOS Dev Mentoring

  Рет қаралды 13,090

Essential Developer

Essential Developer

Күн бұрын

Пікірлер: 21
@EssentialDeveloper
@EssentialDeveloper Жыл бұрын
Join our free crash course to learn how to Master Scalable iOS App Architecture Patterns and Be One of The Most Wanted Senior Developers in The World: iosacademy.essentialdeveloper.com/p/ios-architect-crash-course-orga0eb/?
@ayo_emmanuel
@ayo_emmanuel 4 ай бұрын
Ciao always has an alternative to working-solutions, better alternative. Thank you!
@AtimisApollo
@AtimisApollo Жыл бұрын
Awesome, this vedio includes Unit testing knowledge.
@EssentialDeveloper
@EssentialDeveloper Жыл бұрын
Glad it was helpful!
@Omeir34
@Omeir34 Жыл бұрын
Awesome knowledge sharing!
@ihwan_id
@ihwan_id Жыл бұрын
Thanks caio
@EssentialDeveloper
@EssentialDeveloper Жыл бұрын
Glad it was helpful!
@vaidasskardzius2906
@vaidasskardzius2906 Жыл бұрын
How to deal with this refreshControl when you have RxSwift Binding involved, when you fetch data from rest api on viewDidLoad and refreshControl is binded on BehavioralRelay?
@EssentialDeveloper
@EssentialDeveloper Жыл бұрын
Hi! Start fetching the data in `viewIsAppearing` instead of `viewDidLoad` like we showed in the video to prevent updating the refreshControl in `viewDidLoad`.
@vaidasskardzius2906
@vaidasskardzius2906 Жыл бұрын
@@EssentialDeveloper so I have a tableView and I set refreshControl to a tableView in viewDidLoad, tried to fetch data from a viewIsApearing but it still doesn't show up. If I set it also in the viewIsAppearing it does show up, but it's not animating, it's really weird, ios 16 works flawless
@EssentialDeveloper
@EssentialDeveloper Жыл бұрын
Set the refreshControl in viewDidLoad - this doesn't change. But only update its state after `viewIsAppearing` is called like we show in the video.
@vaidasskardzius2906
@vaidasskardzius2906 Жыл бұрын
Thank you, but I've tried your solution, but it doesn't work. Even if I fetch data in the viewIsAppearing method and only then the BehavioralRelay value changes and only then the refreshControl beginRefreshing method is called, it still doesn't work. Pull to refresh works fine, but on initialLoad it's not appearing if I set it in the viewDidLoad what is shown in this video. Just tried basic setup, without api call, just code like this: private let refreshControl = UIRefreshControl() , as a property injection in VC, viewDidLoad() { super.viewDidLoad() tableView.refreshControl = refreshControl } viewIsAppearing() { super.viewIsAppearing() refreshControl.beginRefreshing() } In this case it appears on the screen but it's not animating just freezed
@EssentialDeveloper
@EssentialDeveloper Жыл бұрын
So the problem is somewhere else. You need to debug to find the issue. In the video, we're using a UITableViewController - but in your case it seems like you aren't. We can't help without looking at the full code.
@michaziobro5301
@michaziobro5301 Жыл бұрын
Are you unit testing view controllers? I think it pointless. UI should be tested with UI tests and unit test are for Logic
@EssentialDeveloper
@EssentialDeveloper Жыл бұрын
UI tests are too slow and flaky. We highly recommend avoiding them as much as possible.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Retain Cycles: How to Detect with Instruments Profiler!
13:55
Lets Build That App
Рет қаралды 50 М.
The Biggest React Framework You've Never Heard of
20:29
Theo - t3․gg
Рет қаралды 48 М.
Multithreading and Concurrency in iOS apps | iOS Dev Live Mentoring
35:40
Essential Developer
Рет қаралды 9 М.