Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ios fullscreen #795

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

gultyayev
Copy link

@gultyayev gultyayev commented May 16, 2024

Fixes fullscreen animation

The main problem here, it seems, is that flexible margins were used on top of the container. This, in conjunction with flexibleWith & flexibleHeight, resulted in a non-fullscreen container which has a background. The AnimationView has the margins and they successfully center the animation within the fullscreen container, now).

Fixes ignored background color

Before, Light and Dark modes on iOS 12+ fell back to a hardcoded value instead of trying to fall back to the non-suffixed value, first. The PR fixes this by assigning an empty string. If no BackgroundColor is present, then the next check for .isEmpty will fire and a hardcoded fallback value will be used.

Removed orientation observer

Flexible margins seem to adjust the position of the animation automatically. So, we can remove the unneeded listener.

Closes #794

@gultyayev gultyayev requested a review from timbru31 as a code owner May 16, 2024 14:55
@gultyayev
Copy link
Author

Check fails seem to be unrelated to my changes

@timbru31
Copy link
Owner

Thanks for your PR! Code wise it looks good to me, but I need to re-test this later on a device with a test app 👍

@rlindgren
Copy link

@gultyayev this change is much better for iOS, from my experience. The scaling however is off a bit between the view presented at launch and presented programmatically from within the app. Do you experience that as well?

@rlindgren
Copy link

@gultyayev @timbru31 the scaling issue I am facing when the splash screen is launched from the native code initially is apparently resolved by removing lines 175-178 in calculateAnimationSize.

@vishnusiriguppa
Copy link

@timbru31 can u plz approve and merge this PR, i need it my app is stuck before release.

@vishnusiriguppa
Copy link

@gultyayev can you plz clarify i was having the same issue, i did install and use this pull request my problem seems to be resolved only half because now the splash screen is centered as required but the scale is fixed not fit the entire screen, by observing your changes i did remove line no 123 (i.e animationViewContainer?.autoresizingMask = [.flexibleWidth, .flexibleHeight]). then i got the animation in full screen, can u check and update pull request.

@papabaab
Copy link

@gultyayev you should take into account also the changes suggested by @vishnusiriguppa i.e removing the line with the autoresizingMask, otherwise the size of the animation is significantly reduced, in my case at least. But when that line is removed, the animations displays with the correct size.
Thanks for all your suggestions tho, it helped me a lot, and a special thanks to @timbru31 for this great plugin

@vishnusiriguppa
Copy link

@gultyayev what ever i suggested that also works with your original fix before merging master to your forked project, i had to use old one only in case of emergency i did try to get full screen in new version, but failed to do it, yes still full screen issue is present this requires a serious cross check of everything before this pr is merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iOS fullscreen not working correctly
5 participants