STPopup
STPopup copied to clipboard
Source View in Background shifts downwards when calling Popup from Bottom
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!
Hi @7er0 , could you upload a screenshot? Is this a new issue introduced in 1.8.4?
@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](https://user-images.githubusercontent.com/13591333/59690067-6f2ae380-91e9-11e9-89a9-e4a723f4f6bd.png)
![Screen Shot 2019-06-18 at 16 49 37](https://user-images.githubusercontent.com/13591333/59690074-72be6a80-91e9-11e9-8a45-558d780017d5.png)