Skip to content

Instantly share code, notes, and snippets.

#import <UIKit/UIKit.h>
@interface UIBezierPath (forEachElement)
- (void)forEachElement:(void (^)(CGPathElement const *element))block;
alcamla /
Created January 11, 2018 14:41 — forked from staltz/
The introduction to Reactive Programming you've been missing
alcamla / AppDelegate.swift
Created May 30, 2018 21:39 — forked from jonathan-beebe/AppDelegate.swift
Detect if a Swift iOS app delegate is running unit tests
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