5

Possible Duplicate:
Maps and legal mention

In iOS 5 or lower I was able to move the Google logo in the map view. iO6 has a "legal" button and this is a MKAttributeLabel. MKAttributeLabel is a private class that I can't edit. I have buttons which overlap the map in the bottom (by design) so i moved the google logo.

Is there a way to reposition the Legal button in ios6 maps?

Community
  • 1
  • 1
Mark Molina
  • 5,057
  • 8
  • 41
  • 69
  • 1
    the question for which this was marked as duplicate, did not really answer the question – AlexWien Jun 23 '13 at 23:00
  • 1
    Yes, i have checked, and concluded that it was closed for wrong reasons. But the solution is more complex when you rotate the map, via a transformation matrix. I would like to add the label to my own view, which looses the Web link. – AlexWien Jun 24 '13 at 13:54
  • How is this a possible Duplicate if the question which linkes to my question is asked later? – Mark Molina Sep 25 '13 at 10:48

1 Answers1

11

The legal label is a standard UILabel, so you can change the frame like an other label :

UIView *legalView = nil;

for (UIView *subview in self.mapview.subviews) {
   if ([subview isKindOfClass:[UILabel class]]) {
            legalView = subview;
            break;
     }
}
legalView.frame = CGRectMake(150, 150, legalView.frame.size.width, legalView.frame.size.height);
Michaël
  • 6,676
  • 3
  • 36
  • 55