Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Draft
kyleve wants to merge7 commits intomain
base:main
Choose a base branch
Loading
fromkve/container-screen

Conversation

@kyleve
Copy link
Contributor

@kylevekyleve commentedSep 27, 2022
edited
Loading

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 removedDescribedViewController usage 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.

  • AddAnyContentScreen, which is a screen-based wrapper aroundDescribedViewController. If the containing screen's VC changes, it'll transition per the added transition type...
  • Speaking of which, added the concept of an animated transition toDescribedViewController when it replaces its content. This in general probably alwaysshould have been a thing; since without an animation, things look pretty sudden / abrupt.

Checklist

  • Unit Tests
  • UI Tests

/// if isLoading {
/// return LoadingScreen(with: ...)
/// } else if isEmpty {
/// return ContentScreen(with ...)
Copy link
ContributorAuthor

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
Copy link
ContributorAuthor

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(){
Copy link
ContributorAuthor

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
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

  • Some words missing here

Copy link
ContributorAuthor

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

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@kyleve

[8]ページ先頭

©2009-2025 Movatter.jp