Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (UIView*) viewToDeactivateInView:(UIView*)view {
- UIView *viewFound = nil;
- if( view && view.subviews && [view.subviews count] > 0 ) {
- for( UIView *currentView in view.subviews ) {
- NSString *className = NSStringFromClass( [currentView class] );
- if( [className isEqualToString:@"VKMapCanvas"] ) {
- viewFound = currentView;
- break;
- }
- else {
- viewFound = [self viewToDeactivateInView:currentView];
- if( viewFound ) {
- break;
- }
- }
- }
- }
- return viewFound;
- }
- - (void) baseMapEnableVisibility:(BOOL)isVisible {
- UIView *targetView = [self viewToDeactivateInView:localMapView];
- if( targetView ) {
- NSLog( @"MAP CANVAS: %@", NSStringFromClass([targetView class]) );
- [targetView.layer setOpacity:(isVisible ? 1.0 : 0.0)];
- }
- else {
- NSLog( @"MAP CANVAS NOT FOUND." );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement