Last active
August 29, 2015 14:06
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