Permalink
Browse files

Fixes to loading spinner on post view. Minimizes map on view switch (…

…about page)
  • Loading branch information...
1 parent 84aafd5 commit 6f92b2325aabd41781c118710fbfe6abd9417620 @akinsey akinsey committed Jun 14, 2012
Showing with 8 additions and 5 deletions.
  1. +8 −4 HI Capacity/AboutViewController.m
  2. +0 −1 HI Capacity/PostsViewController.m
@@ -62,10 +62,8 @@ - (void)viewWillAppear:(BOOL)animated {
- (void)enlargeMap
{
-
UIBarButtonItem *closeButton = [[UIBarButtonItem alloc] initWithTitle:@"Close" style:UIBarButtonItemStylePlain target:self action:@selector(shrinkMap)];
- self.navigationItem.rightBarButtonItem = closeButton;
-
+ [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))];
@@ -89,15 +87,21 @@ - (void)shrinkMap
MKCoordinateRegion viewRegion = MKCoordinateRegionMakeWithDistance(zoomLocation, 200, 200);
MKCoordinateRegion adjustedRegion = [mapView regionThatFits:viewRegion];
[mapView setRegion:adjustedRegion];
- self.navigationItem.rightBarButtonItem = nil;
[UIView commitAnimations];
+ [self.navigationItem setRightBarButtonItem: nil animated:YES];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
+-(void)viewDidDisappear:(BOOL)animated
+{
+ [self shrinkMap];
+ [super viewDidDisappear:NO];
+}
+
- (IBAction)mapButtonClicked:(id)sender {
// CID is for The Box Jelly, HICAP doesn't have its own CID
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://maps.google.com/maps?cid=13799009640966807151"]];
@@ -62,7 +62,6 @@ - (void)viewDidUnload
{
[self setPostTableView:nil];
[super viewDidUnload];
- [self dismissLoading:NO];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}

0 comments on commit 6f92b23

Please sign in to comment.