ios - Moving an MKMapView to a specific location relative to the superview -


i have few annotations added mkmapview, , when user clicks on 1 of annotations, displays uicalloutview right accessory button adds uiview map, displaying information specific location. uiview centred in superview of map, , in order show information in view relative annotation, shift visible map rect down (on y axis), , center on x axis annotation directly under view.

i doing following centre annotation, however, don't know how move annotation down on y axis sits under added uiview. please can tell me how can so?

[self.mapview setcentercoordinate:[annotation coordinate] animated:yes]; 

you can size of information view, know how want use map (based on difference between size , map view size). know offset, can calculate point (in view coordinate system) should moved centre annotation moved down). can use convertpoint:tocoordinatefromview: find coordinate point use setcentercoordinate:animated:.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -