Last active
August 29, 2015 14:06
-
-
Save aceontech/8c0c682daa433862a2ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import MapKit | |
extension MKMapView { | |
/** | |
Closure passes itself in | |
*/ | |
public typealias MKMapViewBuilderClosure = (MKMapView) -> Void | |
/** | |
Add convenience initializer with the builder as its | |
optional parameter | |
*/ | |
public convenience init(builder:MKMapViewBuilderClosure?) { | |
self.init() | |
if let closure = builder { | |
closure(self) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment