iphone - 标签栏和导航 Controller 内的 MKMapView 隐藏了 Google 品牌

标签 iphone objective-c uikit mkmapview uitabbar

我在提交到应用商店时刚刚收到以下消息:

In addition, the application displays images provided by Google Maps without the corresponding Google branding, we cannot post this version to the App Store

我有一个 TabBar,里面有一个 NavigationController。导航 Controller 加载 map

- (void)viewDidLoad {
    [super viewDidLoad];
    mapView = [[MKMapView alloc] initWithFrame:self.view.bounds];
    // ...
}

这可行,但 map View 结束于选项卡栏下方,因此不会显示 Google Logo 。为了正确获取框架,我必须手动创建它

- (void)viewDidLoad {
    [super viewDidLoad];
    mapView = [[MKMapView alloc] initWithFrame:CGRectMake(0,0,320,370)];
    // ...
}

这可行,但感觉不对。正确的做法是什么?

主界面(TabBar + 导航 Controller )是在 Interface Builder 中创建的。

最佳答案

这解决了问题

mapView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);

关于iphone - 标签栏和导航 Controller 内的 MKMapView 隐藏了 Google 品牌,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3685401/

相关文章:

ios - locationOfTouch 导致 SIGABRT

iphone - 获取 ViewController 的名称

iphone - iPhone中的串口编程

ios - 在boundingRectWithSize:options:context中使用NSStringDrawingUsesLineFragmentOrigin获取额外的空格

objective-c - 如何以编程方式获取 OS X 中上次系统启动/重新启动的持续时间?

iphone - UIActivity子类打开webview

iphone - 在启动动画之前修改 iPhone 动画容器 View

javascript - 在 iPhone 上禁用 "block selection"

iphone - 使用 TfL 数据的 iPhone 应用程序的 IP 地址是什么?

objective-c - 不可能在钥匙串(keychain)中存储电子邮件 (KeychainItemWrapper)