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:
authorv.mikhaylenko <v.mikhaylenko@corp.mail.ru>2015-06-21 21:15:35 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:52:48 +0300
commit377513b29c6096d0a33d75e9327fa78bbf830b80 (patch)
treec408fb3945d6e020f169e9702e9ed79825554189 /iphone/Maps/Classes/MWMBookmarkColorViewController.mm
parentfad1f704cb283093c386a6c7286e333c4309f7dc (diff)
[ios] Added animation to iPad place page && fixed bugs.
Diffstat (limited to 'iphone/Maps/Classes/MWMBookmarkColorViewController.mm')
-rw-r--r--iphone/Maps/Classes/MWMBookmarkColorViewController.mm32
1 files changed, 17 insertions, 15 deletions
diff --git a/iphone/Maps/Classes/MWMBookmarkColorViewController.mm b/iphone/Maps/Classes/MWMBookmarkColorViewController.mm
index 08a472eb57..21fdfffc1f 100644
--- a/iphone/Maps/Classes/MWMBookmarkColorViewController.mm
+++ b/iphone/Maps/Classes/MWMBookmarkColorViewController.mm
@@ -36,14 +36,6 @@ static NSString * const kBookmarkColorCellIdentifier = @"MWMBookmarkColorCell";
self.title = L(@"bookmark_color");
[self.tableView registerNib:[UINib nibWithNibName:kBookmarkColorCellIdentifier bundle:nil] forCellReuseIdentifier:kBookmarkColorCellIdentifier];
self.colorWasChanged = NO;
-}
-
-- (void)viewWillAppear:(BOOL)animated
-{
- [super viewWillAppear:animated];
- [self configureTableViewForOrientation:self.interfaceOrientation];
- [self.tableView reloadData];
-
if (!self.iPadOwnerNavigationController)
return;
@@ -54,8 +46,14 @@ static NSString * const kBookmarkColorCellIdentifier = @"MWMBookmarkColorCell";
UIButton * backButton = [[UIButton alloc] initWithFrame:CGRectMake(0., 0., backImage.size.width, backImage.size.height)];
[backButton addTarget:self action:@selector(backTap) forControlEvents:UIControlEventTouchUpInside];
[backButton setImage:backImage forState:UIControlStateNormal];
- UIBarButtonItem * leftButton = [[UIBarButtonItem alloc] initWithCustomView:backButton];
- [self.navigationItem setLeftBarButtonItem:leftButton];
+ [self.navigationItem setLeftBarButtonItem:[[UIBarButtonItem alloc] initWithCustomView:backButton]];
+}
+
+- (void)viewWillAppear:(BOOL)animated
+{
+ [super viewWillAppear:animated];
+ [self configureTableViewForOrientation:self.interfaceOrientation];
+ [self.tableView reloadData];
}
- (void)backTap
@@ -115,13 +113,12 @@ static NSString * const kBookmarkColorCellIdentifier = @"MWMBookmarkColorCell";
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
- if (self.colorWasChanged)
+ if (self.colorWasChanged && !self.iPadOwnerNavigationController)
+ {
[self.placePageManager reloadBookmark];
-
- if (!self.iPadOwnerNavigationController)
return;
-
- [self.iPadOwnerNavigationController setNavigationBarHidden:YES];
+ }
+ self.iPadOwnerNavigationController.navigationBar.hidden = YES;
self.iPadOwnerNavigationController.view.height = self.realPlacePageHeight;
}
@@ -153,6 +150,11 @@ static NSString * const kBookmarkColorCellIdentifier = @"MWMBookmarkColorCell";
{
self.colorWasChanged = YES;
self.placePageManager.entity.bookmarkColor = kBookmarkColorsVariant[indexPath.row];
+ if (!self.iPadOwnerNavigationController)
+ return;
+
+ [self.placePageManager reloadBookmark];
+ GetFramework().Invalidate();
}
@end