Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Grechuhin <i.grechuhin@mapswithme.com>2015-06-25 11:55:32 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:52:59 +0300
commit688307aee358f13056be6d2e1795103c4c72ef74 (patch)
tree76569f367f0fc2a42c39e99bc1ee2b8ed804a03f /iphone/Maps/Classes/MWMBookmarkColorViewController.mm
parent9de3f407e7e556de041e3ffbfa32a3a68c78965a (diff)
[ios] Fixed PP reopen bug. Code cleanup.
Diffstat (limited to 'iphone/Maps/Classes/MWMBookmarkColorViewController.mm')
-rw-r--r--iphone/Maps/Classes/MWMBookmarkColorViewController.mm28
1 files changed, 3 insertions, 25 deletions
diff --git a/iphone/Maps/Classes/MWMBookmarkColorViewController.mm b/iphone/Maps/Classes/MWMBookmarkColorViewController.mm
index 574abf6f38..fa54c23d10 100644
--- a/iphone/Maps/Classes/MWMBookmarkColorViewController.mm
+++ b/iphone/Maps/Classes/MWMBookmarkColorViewController.mm
@@ -19,7 +19,6 @@ static NSString * const kBookmarkColorCellIdentifier = @"MWMBookmarkColorCell";
@interface MWMBookmarkColorViewController ()
@property (weak, nonatomic) IBOutlet UITableView * tableView;
-@property (nonatomic) CGFloat realPlacePageHeight;
@property (nonatomic) BOOL colorWasChanged;
@end
@@ -39,7 +38,6 @@ static NSString * const kBookmarkColorCellIdentifier = @"MWMBookmarkColorCell";
if (!self.iPadOwnerNavigationController)
return;
- self.realPlacePageHeight = self.iPadOwnerNavigationController.view.height;
CGFloat const bottomOffset = 88.;
self.iPadOwnerNavigationController.view.height = self.tableView.height + bottomOffset;
UIImage * backImage = [UIImage imageNamed:@"NavigationBarBackButton"];
@@ -58,7 +56,7 @@ static NSString * const kBookmarkColorCellIdentifier = @"MWMBookmarkColorCell";
- (void)backTap
{
- [self popViewController];
+ [self.navigationController popViewControllerAnimated:YES];
}
- (void)configureTableViewForOrientation:(UIInterfaceOrientation)orientation
@@ -110,33 +108,13 @@ static NSString * const kBookmarkColorCellIdentifier = @"MWMBookmarkColorCell";
return YES;
}
-- (void)popViewController
-{
- if (!self.iPadOwnerNavigationController)
- {
- [self.navigationController popViewControllerAnimated:YES];
- return;
- }
-
- [UIView animateWithDuration:0.1 animations:^
- {
- self.iPadOwnerNavigationController.view.height = self.realPlacePageHeight;
- }
- completion:^(BOOL finished)
- {
- [self.navigationController popViewControllerAnimated:YES];
- }];
-}
-
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
if (self.colorWasChanged && !self.iPadOwnerNavigationController)
- {
[self.placePageManager reloadBookmark];
- return;
- }
- self.iPadOwnerNavigationController.navigationBar.hidden = YES;
+ else
+ self.iPadOwnerNavigationController.navigationBar.hidden = YES;
}
@end