How can I hide the legal link to moomapview monotouch iPhone

MKMapview has a legal link to its direct point. I want to add a button on this place. The button has some transparency. can i hide the legal link? Or, if I set my buttons to hide this link, can Apple abandon my application?

I also have some kinds of subviews in my map view.

+2
source share
5 answers

DO NOT hide this legal link or your application will be rejected by Apple.

EDIT: , , : https://github.com/bartvandendriessche/MKMapView-AttributionView

+2

, , .

[[self.mapView.subviews objectAtIndex:1] removeFromSuperview];
+4

, , . :

var legalLabel: UIView?
for subview in stableMapView.subviews {
    if String(describing: type(of: subview)) == "MKAttributionLabel" {
        legalLabel = subview
    }
}
legalLabel?.isHidden = true
+1

:

extension MKMapView {
    var attributedView: UIView? {
        for subview in subviews {
            if String(describing: type(of: subview)).contains("Label") {
                return subview
            }
        }
        return nil
    }

    func hideAttributedView() {
        guard let attributedView = attributedView else {
            return
        }
        attributedView.isHidden = true
    }
}
0

Apple (MapView).

.

mapView.subviews[1].isHidden = true

mapView.subviews[2].isHidden = true
0

Source: https://habr.com/ru/post/1526705/


All Articles