2009-10-29 117 views

回答

1

無法使用可用的API。

3

雖然沒有直接的API來操縱的標誌,你仍然可以實現一種變通方法。 Google徽標是地圖視圖的子視圖集合中的第二個視圖。下面是僞代碼在你MapViewController類:

// Get logo image view 
UIImageView* imageView = [self.mapView.subviews objectAtIndex:1]; 
// Get the actual image 
UIImage* googleLogo = [imageView image]; 
// Declare your own image view (googleMapsLogo) to host the logo 
// and put it onto map view at the desired position 
// Assign to Google logo image to it 
self.googleMapsLogo.image = googleLogo; 
// Hide the original Google logo 
imageView.hidden = YES; 

如果您需要動態定位的標誌,你可以通過改變googleMapsLogo.center物業這樣做。或者,您可以嘗試重新放置原始徽標的圖片視圖。

+0

我想(隱藏標識)會違背ToS。 – 2011-05-12 03:36:12

+0

你並沒有隱藏標誌本身。我描述了一種解決方法,將徽標顯示在不同的位置。當然,如果您修改徽標的尺寸或將其放在地圖上完全不同的位置,您可能會被拒絕。但是,例如,當您想要在地圖底部顯示半透明視圖時,您可能會發現自己處於某種情況。在這種情況下,徽標會被您的視圖遮擋,您的應用程序肯定會被Apple拒絕。我有經驗。在這種情況下,我的解決方法正常工作。測試。 – GregK 2011-05-12 19:08:39

相關問題