SwiftUIBackports
SwiftUIBackports copied to clipboard
Infinite loop in UIView parentController property on iOS 14.0-14.4
General Information
See attached project
-
Project version: 1.6.3
-
Platform/OS version: iOS 14.0-14.4
-
IDE version: Xcode 13
-
Devices:
- Any related GitHub issues:
Describe the bug
Uninited tab body causes infinite loop in UIView parentController property
Steps to reproduce
- Run attached project on iOS 14.0-14.4
- Tap "Show modal" on tab A
- Select TextField
Expected behavior
No infinite loop in OwningController.swift
Stack trace, compiler error, code snippets
Additional context
If tab B were opened before Modal, all works fine.
Thank you for raising, will investigate 👍🏻
This issue could occur in other scenarios, but this is simplest way to reproduce
Just ran into this as well with a TabView. Thank you for looking into it.
I'm having trouble getting this issue to show up tbh. I've used your project and explored this myself but I cannot reproduce. Are you able to reproduce 100% of the time?
You mention above that the issue occurs in Xcode 13, but you saved the project using Xcode 14 beta, so I fixed that and tried in 13 but still no joy.
Yes, 100%. Same problem on Xcode 14, no difference. Which simulator did you use? Just checked on Xcode 14 RC + iPhone 11 14.1, same problem.
Ok I'll try that, odd that its not 100% of the time for me. Thanks for checking, will try this now.
I've got same problem on latest iOS with .backport.scrollDisabled(true)
on code like this:
ScrollView {
LazyVGrid(columns: [GridItem(.adaptive(minimum: 140))]) {
rows
}
}
.backport.scrollDisabled(true)
But I can't achieve this on minimal reproducible example :(
Yeah I'm guessing its an issue in the view controller lookup code, I think I have an idea for fixing it overall.
@anivaros I should have a new release out today/tomorrow that I think resolves this issue completely.
Great news! 🔥
FYI I’ve fallen sick today, will get to this very soon, just need a couple days 👍🏻
Oh! Get well soon!
@anivaros the fix should now be in main
– if you could check it out and confirm it resolves the issues you've been seeing that'd be great, if so, I can merge in just that change and make a release – thanks!
.@shaps80 I've checked, now all ok. Also checked issue with .backport.scrollDisabled(true)
and LazyVGrid
. Looks like now all works as expected 🎉
Thank you!!
Amazing! Glad to hear. I'll get this in shortly :)