-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGMSMapView+Additions.m
More file actions
executable file
·36 lines (29 loc) · 938 Bytes
/
GMSMapView+Additions.m
File metadata and controls
executable file
·36 lines (29 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// GMSMapView+Additions.m
// Driver
//
// Created by Antonio Pinho on 29/10/2014.
// Copyright (c) 2014 Evolution. All rights reserved.
//
#import "GMSMapView+Additions.h"
@implementation GMSMapView (Additions)
- (UIButton *)myLocationButton {
NSMutableArray *buttons = [NSMutableArray new];
for (UIView *object in self.subviews) {
if([[[object class] description] isEqualToString:@"GMSUISettingsView"] )
{
for(UIView *view in object.subviews) {
if([[[view class] description] isEqualToString:@"GMSx_QTMButton"] ) {
[buttons addObject:view];
}
}
}
};
if (buttons.count == 0) {
NSLog(@"UPDATING GOOGLE MAPS MIGHT HAVE BROKEN THE LOCATION BUTTON. CHECK IF IT HAS THE CORRECT IMAGE ON PRESSED STATE!");
return nil;
} else {
return [buttons firstObject];
}
}
@end