fixes #157: attribution improvements & fixes from @ryanmaxwell
Showing
1 changed file
with
13 additions
and
2 deletions
@@ -34,9 +34,9 @@ | @@ -34,9 +34,9 @@ | ||
34 | 34 | ||
35 | self.view.backgroundColor = [UIColor darkGrayColor]; | 35 | self.view.backgroundColor = [UIColor darkGrayColor]; |
36 | 36 | ||
37 | - [self.view addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissModalViewControllerAnimated:)]]; | 37 | + [self.view addGestureRecognizer:[[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissModalViewControllerAnimated:)] autorelease]]; |
38 | 38 | ||
39 | - UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, self.view.bounds.size.height - 70, self.view.bounds.size.width, 60)]; | 39 | + UIWebView *webView = [[[UIWebView alloc] initWithFrame:CGRectMake(0, self.view.bounds.size.height - 70, self.view.bounds.size.width, 60)] autorelease]; |
40 | 40 | ||
41 | webView.delegate = self; | 41 | webView.delegate = self; |
42 | 42 | ||
@@ -45,6 +45,17 @@ | @@ -45,6 +45,17 @@ | ||
45 | webView.backgroundColor = [UIColor clearColor]; | 45 | webView.backgroundColor = [UIColor clearColor]; |
46 | webView.opaque = NO; | 46 | webView.opaque = NO; |
47 | 47 | ||
48 | + if ([webView respondsToSelector:@selector(scrollView) ]) | ||
49 | + { | ||
50 | + webView.scrollView.bounces = NO; | ||
51 | + } | ||
52 | + else | ||
53 | + { | ||
54 | + for (id subview in webView.subviews) | ||
55 | + if ([[subview class] isSubclassOfClass:[UIScrollView class]]) | ||
56 | + ((UIScrollView *)subview).bounces = NO; | ||
57 | + } | ||
58 | + | ||
48 | NSMutableString *attribution = [NSMutableString string]; | 59 | NSMutableString *attribution = [NSMutableString string]; |
49 | 60 | ||
50 | for (id <RMTileSource>tileSource in mapView.tileSources) | 61 | for (id <RMTileSource>tileSource in mapView.tileSources) |
-
Please register or login to post a comment