How to move legal link in mkmapview iOS 7

since we all know Apple, we always need to change something for each update. Has anyone solved the problem of relocation for a legal map link?

I tried many ways to control a legal shortcut, but can it just be hidden? what else can i do?

early

-1
source share
3 answers

You need to change bottomLayoutGuide for your UIViewController. Create a class with the following code:

MapLayoutGuide.h

@interface MapLayoutGuide : NSObject <UILayoutSupport>
-(id)initWithLength:(CGFloat)length;
@end

MapLayoutGuide.m

#import "MapLayoutGuide.h"
@implementation MapLayoutGuide
@synthesize length = _length;

- (id)initWithLength:(CGFloat)length
{
    if (self = [super init]) 
    {
        _length = length;
    }
    return self;
}
@end

And then in your UIViewController displaying the map, add the following:

-(id <UILayoutSupport>)bottomLayoutGuide
{
    return [[MapLayoutGuide alloc] initWithLength:kMapViewBottomContentInset];
}

kMapViewBottomContentInset - . UITabBar, .

, AutoLayout .

+3

, - . , " " . , ( ) .

+1
override func viewWillLayoutSubviews() {
    positionLegalMapLabel()
}

func positionLegalMapLabel() {
    let legalMapLabel = self.mapView.subviews[1]

    legalMapLabel.frame.origin = CGPointMake(self.mapView.bounds.size.width - legalMapLabel.frame.size.width - 7, legalMapLabel.frame.origin.y)
}
0

All Articles