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 <Foundation/Foundation.h> | |
typedef void (^RCTaskBlock)(NSString *keyPath, id object, NSDictionary *change); | |
@interface TZReceptionist : NSObject | |
+ (id)receptionistForKeyPath:(NSString *)path | |
object:(id)obj | |
queue:(NSOperationQueue *)queue | |
task:(RCTaskBlock)task; | |
@end |
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
public class var sharedConfiguration: AppConfiguration { | |
struct Singleton { | |
static let sharedAppConfiguration = AppConfiguration() | |
} | |
return Singleton.sharedAppConfiguration | |
} | |
// Checkout Lister: A Productivity App Built in Swift by Apple |
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
// https://twitter.com/dwineman/status/601853359839006721 | |
// Default arguments are expressions, not constants, evaluated only when necessary. | |
extension UIImage { | |
static func emptyImage(size: CGSize, scale: CGFloat = UIScreen.mainScreen().scale) -> UIImage { | |
UIGraphicsBeginImageContextWithOptions(size, false, scale) | |
let image = UIGraphicsGetImageFromCurrentImageContext() | |
UIGraphicsEndImageContext() | |
return image | |
} |
OlderNewer