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
func bezierPath(p1: CLLocationCoordinate2D, toPoint p2: CLLocationCoordinate2D, steps: Int = 100) | |
-> [CLLocationCoordinate2D] | |
{ | |
let auxiliaryPoint = self.fetchThirdPointByLocations(p1, p2: p2, angle: 90.0) | |
var targetPoints = [CLLocationCoordinate2D]() | |
let doubleSteps = Double(steps) | |
for index in 0 ... steps { | |
let t = Double(index) / doubleSteps |
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
struct Foo { | |
var bar: String = "" | |
} | |
class Something { | |
var foo: Foo = Foo() { | |
didSet { | |
println("didSet called") | |
} | |
} |
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
#!/usr/bin/env xcrun swift -O | |
struct MyOptions: RawOptionSetType, BooleanType { | |
var boolValue: Bool { return self.rawValue != 0 } | |
var rawValue: UInt | |
init(rawValue value: UInt) { | |
self.rawValue = value | |
} | |
init(nilLiteral: Void) { |
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
#!/usr/bin/env osascript | |
on run argv | |
if count of argv < 1 then | |
logEvent("Usage: ./changeVersion iOSVersion(7.1,7.0)") | |
error number -128 | |
end | |
set iOSVersion to item 1 of argv | |
NewerOlder