2

With iOS < 6.0 we were able to re-position the "Google" link over map view (by browsing the subviews of map view). Now with iO6, there's a "legal" link and this is a MKAttributeLabel. A private class that we can't manipulate ...

My problem is that I must add a footer subview to my map and it'll hide the legal link ... How can I solve this problem without any App Store rejection ?

Can I create another legal button my self and add it where I want in my map view ? I have no idea what I'm able to do...

Artjom B.
  • 61,146
  • 24
  • 125
  • 222
Pierre
  • 10,593
  • 5
  • 50
  • 80

2 Answers2

1

There's a few answers recommending you move the legal label in the viewDidAppear of your view controller, however this doesn't work if you then resize your map view (like I am).

The best way is to subclass the MKMapView and override the layoutSubviews method. In my example I just needed to nudge the legal label above a semi-transparent toolbar.

-(void)layoutSubviews
{
    [super layoutSubviews];
    UILabel *legalLabel;
    for(UIView *view in self.subviews)
    {
        if([view isKindOfClass:[UILabel class]])
        {
            legalLabel = (UILabel *)view;
            break;
        }
    }
    legalLabel.center = CGPointMake(legalLabel.center.x, self.bounds.size.height - 55.0f);
}
Mick Byrne
  • 14,394
  • 16
  • 76
  • 91
0

Does the footer view have to be inside the map boundary, why not put the map and the footer into the same super view?

Craig
  • 8,093
  • 8
  • 42
  • 74
  • Sorry this is what i've done. Footer and Map are subviews of one superview. The footer has transparency and is overlaying the map – Pierre Oct 16 '12 at 09:17
  • 1
    Well if the problem is that it hides the map, don't make them overlap – Craig Oct 16 '12 at 19:50
  • 2
    Problem solved : I'm now using Route-Me and Bing map. Sorry Apple but upgrade your API ... – Pierre Oct 16 '12 at 20:24
  • @Pierre Just curious: are you using Google API and Apple Map in your case? I am asking because one is not supposed to draw data gathered from Google over a map that is not Google Map. Are you saying that even though you are using Apple Map, you are still supposed to show the Google Legal link? – Unheilig May 28 '15 at 03:38