This file contains hidden or 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
typealias ConfigurationClosure<T> = (inout T) throws -> Void | |
protocol Configurable {} | |
extension Configurable { | |
func configure(_ step: ConfigurationClosure<Self>) rethrows -> Self { | |
var mutableSelf = self | |
try step(&mutableSelf) | |
return mutableSelf | |
} |
This file contains hidden or 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
func synchronized<T>(_ lock: Any, _ body: () throws -> T) rethrows -> T { | |
objc_sync_enter(lock) | |
defer { objc_sync_exit(lock) } | |
return try body() | |
} |
This file contains hidden or 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
- (void)setLocation:(CLLocation *)currentLocation; | |
- (void)setUserComment:(NSString*)comment; | |
- (void)setDateOriginal:(NSDate *)date; | |
- (void)setDateDigitized:(NSDate *)date; | |
- (void)setMake:(NSString*)make model:(NSString*)model software:(NSString*)software; | |
- (void)setDescription:(NSString*)description; | |
- (void)setKeywords:(NSString*)keywords; | |
- (void)setImageOrientarion:(UIImageOrientation)orientation; |