Skip to content

Instantly share code, notes, and snippets.

@aceontech
Last active August 29, 2015 14:06
Show Gist options
  • Save aceontech/050d2e53fe931df53431 to your computer and use it in GitHub Desktop.
Save aceontech/050d2e53fe931df53431 to your computer and use it in GitHub Desktop.
class ViewController : UIViewController, MKMapViewDelegate {
/**
Create lazy property to the map view, initializing it with
the convenience init function described in the class
extension above
*/
lazy var mapView:MKMapView = MKMapView { m in
m.delegate = self
m.showsUserLocation = true
// Do some other lazy init-related operation..
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment