如何在mkmapview IOS 7中移动合法链接 [英] How to move legal link in mkmapview IOS 7

查看:190
本文介绍了如何在mkmapview IOS 7中移动合法链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

就像我们所知道的Apple一样,我们总是需要为每次更新改变一些东西。有人解决了地图法律链接的移动问题吗?

as all we know Apple, we always need to change something for each update. Did somebody solve the moving problem for map legal link?

我尝试了很多方法来控制法律标签,但是,它可以被隐藏吗?
我能做什么?

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

提前感谢

推荐答案

您需要更改bottomLayoutGuide for your UIViewController中。使用以下代码创建一个类:

You need to change bottomLayoutGuide for your UIViewController. Create a class with 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

然后在你的UIViewController中,即显示地图,添加:

And then in your UIViewController, that is displaying map, add this:

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

其中kMapViewBottomContentInset - 你想提升法律链接多少钱。通常是UITabBar的大小,如果你有的话。

where kMapViewBottomContentInset - how much do you want to lift up Legal link. Typically size of UITabBar, if you have one.

即使你没有在视图上使用AutoLayout,这个解决方案也能正常工作。

This solution works even if you don't use AutoLayout on your view.

这篇关于如何在mkmapview IOS 7中移动合法链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆