I am working on my first swift application for the iPad. Thus far I have a basic mapview with a button in the bottom toolbar, which I would like to refresh and focus onto th
Try the following 3 line code:
@IBAction func refresh(sender: AnyObject) {
mapView.setCenterCoordinate(mapView.userLocation.coordinate, animated: true)
}
EDIT
Check the following:
Can you see the dot on the left side of the method?
I want see your connections inspector. Refresh button and refresh
method are connected correctly?