diff options
author | v.mikhaylenko <v.mikhaylenko@corp.mail.ru> | 2015-06-19 14:24:41 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:52:44 +0300 |
commit | 244958943e290fb26cb29708a97c82425204b77d (patch) | |
tree | 1ca1ad8f9f04b15c1ac8337b76d488320d247696 /iphone/Maps/Classes/MWMiPadPlacePage.mm | |
parent | f074299ef0146ba6d41654f055ebf75697aa857c (diff) |
[ios] Fixed wrong place page layout on iPad.
Diffstat (limited to 'iphone/Maps/Classes/MWMiPadPlacePage.mm')
-rw-r--r-- | iphone/Maps/Classes/MWMiPadPlacePage.mm | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/iphone/Maps/Classes/MWMiPadPlacePage.mm b/iphone/Maps/Classes/MWMiPadPlacePage.mm index f7e43f83f0..fa0e081b3b 100644 --- a/iphone/Maps/Classes/MWMiPadPlacePage.mm +++ b/iphone/Maps/Classes/MWMiPadPlacePage.mm @@ -74,27 +74,25 @@ extern CGFloat kBookmarkCellHeight; [self.navigationController removeFromParentViewController]; self.navigationController = [[MWMiPadNavigationController alloc] initWithRootViewController:self.viewController]; - UIView const * view = self.manager.ownerViewController.view; + UIView * view = self.manager.ownerViewController.view; CGFloat const topOffset = 36.; CGFloat const leftOffset = 12.; CGFloat const defaultWidth = 360.; - CGFloat const actionBarHeight = 58.; - CGFloat const defaultHeight = self.basePlacePageView.height + self.anchorImageView.height + actionBarHeight; + CGFloat const actionBarHeight = self.actionBar.height; + CGFloat const height = self.basePlacePageView.height + self.anchorImageView.height + actionBarHeight - 1; + self.navigationController.view.frame = CGRectMake(leftOffset, topOffset, defaultWidth, height); + self.viewController.view.frame = self.navigationController.view.frame; [self.manager.ownerViewController addChildViewController:self.navigationController]; - - self.navigationController.view.frame = CGRectMake(leftOffset, topOffset, defaultWidth, defaultHeight); - self.viewController.view.frame = CGRectMake(leftOffset, topOffset, defaultWidth, defaultHeight); - - self.extendedPlacePageView.frame = CGRectMake(0., 0., defaultWidth, defaultHeight - 1); + [view addSubview:self.navigationController.view]; + [self.viewController.view addSubview:self.extendedPlacePageView]; + self.extendedPlacePageView.size = self.navigationController.view.size; + [self.viewController.view addSubview:self.extendedPlacePageView]; + self.extendedPlacePageView.origin = CGPointZero; self.anchorImageView.image = nil; self.anchorImageView.backgroundColor = [UIColor whiteColor]; - - self.actionBar.width = defaultWidth; - self.actionBar.origin = CGPointMake(0., defaultHeight - actionBarHeight - 1); - [self.viewController.view addSubview:self.extendedPlacePageView]; - [self.viewController.view addSubview:self.actionBar]; - [view addSubview:self.navigationController.view]; + [self.extendedPlacePageView addSubview:self.actionBar]; + self.actionBar.frame = CGRectMake(0., self.extendedPlacePageView.maxY - actionBarHeight, defaultWidth, actionBarHeight); } - (void)dismiss |