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

Source View in Background shifts downwards when calling Popup from Bottom #123

Open
7er0 opened this issue Mar 14, 2019 · 2 comments
Open

Comments

@7er0
Copy link

7er0 commented Mar 14, 2019

Whenever I call the PopupVC, the view shifts around 30 points downwards, and when I dismiss, it shifts back up, which is quite annoying. Might there be a problem with the iPhone X implementation (because of safe areas)? Or might I have other unrelated code which is causing the problem (maybe extendedLayouts or something alike)?

I am calling the PopupVC like this:

ZUserInfoTableViewController *uvc = [ZUserInfoTableViewController new];
STPopupController *popupController = [[STPopupController alloc] initWithRootViewController:uvc];
popupController.style = STPopupStyleBottomSheet;
popupController.containerView.layer.cornerRadius = 3.0f;
[popupController presentInViewController:self];

And in ZUserInfoTableViewController:

- (instancetype)init
{
    if (self = [super init]) {
        CGRect screenRect = [[UIScreen mainScreen] bounds];
        CGFloat screenWidth = screenRect.size.width;
        self.contentSizeInPopup = CGSizeMake(screenWidth, 500);
        self.landscapeContentSizeInPopup = CGSizeMake(400, 200);
    }
    return self;
}

I am glad for any help!

@kevin-lyn
Copy link
Owner

Hi @7er0 , could you upload a screenshot? Is this a new issue introduced in 1.8.4?

@Ariandr
Copy link

Ariandr commented Jun 18, 2019

@kevin0571
I also noticed this bug. Please, look at the screenshots. When the popup opens, it shifts the view down.

But when I close the popup, it returns back. As you can see, in my app I use the blur effect, so, it's not very noticeable for users.

Also, the bug doesn't appear if the navigation bar is visible on the page. Only when it's modified as on my screenshot (e.g. transparent).

Screen Shot 2019-06-18 at 16 48 33

Screen Shot 2019-06-18 at 16 49 37

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

No branches or pull requests

3 participants