Authored by Justin R. Miller

properly dismiss modal on iOS 6 from taps

@@ -15,6 +15,8 @@ @@ -15,6 +15,8 @@
15 15
16 @property (nonatomic, assign) UIViewController *viewControllerPresentingAttribution; 16 @property (nonatomic, assign) UIViewController *viewControllerPresentingAttribution;
17 17
  18 +- (void)dismissAttribution:(id)sender;
  19 +
18 @end 20 @end
19 21
20 #pragma mark - 22 #pragma mark -
@@ -47,7 +49,8 @@ @@ -47,7 +49,8 @@
47 49
48 self.view.backgroundColor = (RMPostVersion7 ? [UIColor colorWithWhite:1 alpha:0.9] : [UIColor darkGrayColor]); 50 self.view.backgroundColor = (RMPostVersion7 ? [UIColor colorWithWhite:1 alpha:0.9] : [UIColor darkGrayColor]);
49 51
50 - [self.view addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismiss:)]]; 52 + if (RMPreVersion7)
  53 + [self.view addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismiss:)]];
51 54
52 CGRect frame = (RMPostVersion7 ? self.view.bounds : CGRectMake(0, self.view.bounds.size.height - 70, self.view.bounds.size.width, 60)); 55 CGRect frame = (RMPostVersion7 ? self.view.bounds : CGRectMake(0, self.view.bounds.size.height - 70, self.view.bounds.size.width, 60));
53 56
@@ -176,8 +179,7 @@ @@ -176,8 +179,7 @@
176 179
177 - (void)dismiss:(id)sender 180 - (void)dismiss:(id)sender
178 { 181 {
179 - self.modalTransitionStyle = UIModalTransitionStyleCoverVertical;  
180 - [self.presentingViewController dismissModalViewControllerAnimated:YES]; 182 + [self.mapView dismissAttribution:self];
181 } 183 }
182 184
183 #pragma mark - 185 #pragma mark -