Permalink
Browse files

Stopped flickering of close button when clicking on map

  • Loading branch information...
akinsey committed Jun 14, 2012
1 parent 6f92b23 commit 4b34ec878c10cf97bf7f1cb08fe1276844a19f73
Showing with 2 additions and 1 deletion.
  1. +2 −1 HI Capacity/AboutViewController.m
@@ -63,7 +63,8 @@ - (void)viewWillAppear:(BOOL)animated {
- (void)enlargeMap
{
UIBarButtonItem *closeButton = [[UIBarButtonItem alloc] initWithTitle:@"Close" style:UIBarButtonItemStylePlain target:self action:@selector(shrinkMap)];
- [self.navigationItem setRightBarButtonItem: closeButton animated:YES];
+ if(self.navigationItem.rightBarButtonItem == nil)
+ [self.navigationItem setRightBarButtonItem: closeButton animated:YES];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.85];
[self.mapView setFrame:(CGRectMake(mapView.frame.origin.x, mapView.frame.origin.y, mapView.frame.size.width, 370))];

0 comments on commit 4b34ec8

Please sign in to comment.