- Notifications
You must be signed in to change notification settings - Fork46
[WIP DNR] Allow wrapping screens to guarantee a described view controller#159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
* origin/main: Changed expectPublisher/expectTask to be expect Updatd development podspec Added Concurrency Testing
| /// if isLoading { | ||
| /// return LoadingScreen(with: ...) | ||
| /// } else if isEmpty { | ||
| /// return ContentScreen(with ...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
returns are backwards
| letcontent=content() | ||
| iflet content= contentas?Self{ | ||
| self= content |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Oops, this drops thetransition
| preferredContentSize= newPreferredContentSize | ||
| } | ||
| privatefunc currentViewControllerChanged(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
- I think this needs update for iOS 16 and 17
| #if canImport(UIKit) | ||
| /// Used by `AnyContentScreen` and `DescribedViewController` to the backing view |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
- Some words missing here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
- Add: Tests for animated and non-animated transitions
Uh oh!
There was an error while loading.Please reload this page.
This PR introduces a wrapper screen that transitions its content when the underlying VC type changes; which was lost as a "standard" thing when we removed
DescribedViewControllerusage from our apps – since it effectively doubled the VC hierarchy depth. Some folks still want this behavior, so giving them a more concrete way to achieve it.AnyContentScreen, which is a screen-based wrapper aroundDescribedViewController. If the containing screen's VC changes, it'll transition per the added transition type...DescribedViewControllerwhen it replaces its content. This in general probably alwaysshould have been a thing; since without an animation, things look pretty sudden / abrupt.Checklist