(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#import <UIKit/UIKit.h> | |
@interface UIBezierPath (forEachElement) | |
- (void)forEachElement:(void (^)(CGPathElement const *element))block; | |
@end |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import UIKit | |
// Detect if the app is running unit tests. | |
// Note this only detects unit tests, not UI tests. | |
func isRunningUnitTests() -> Bool { | |
let env = NSProcessInfo.processInfo().environment | |
if let injectBundle = env["XCInjectBundle"] { | |
return NSString(string: injectBundle).pathExtension == "xctest" | |
} | |
return false |
git merge v1.0 --no-commit --no-ff |
print(String(data: try! JSONSerialization.data(withJSONObject: dict, options: .prettyPrinted), encoding: .utf8)!) |
final class Singleton { | |
static let shared = Singleton() | |
private init() {} | |
} |
po Realm.Configuration.defaultConfiguration.fileURL
defaults write com.apple.iphonesimulator AllowFullscreenMode -bool YES