From 317b97152b519f4c323b878ebcf1f9c1d735ec39 Mon Sep 17 00:00:00 2001 From: Joseph Lord Date: Sat, 25 Jul 2015 23:40:25 +0100 Subject: [PATCH 1/2] Resolve compiler error in Beta4 --- Turtle.playground/Sources/Secret Turtle Stuff/TurtleView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Turtle.playground/Sources/Secret Turtle Stuff/TurtleView.swift b/Turtle.playground/Sources/Secret Turtle Stuff/TurtleView.swift index 9414da9..92081aa 100644 --- a/Turtle.playground/Sources/Secret Turtle Stuff/TurtleView.swift +++ b/Turtle.playground/Sources/Secret Turtle Stuff/TurtleView.swift @@ -13,7 +13,7 @@ public class TurtleView: UIView { self.backgroundColor = backgroundColor addSubview(avatarView) } - required public init(coder aDecoder: NSCoder) { + required public init?(coder aDecoder: NSCoder) { super.init(coder:aDecoder) } From 8cbe3c4d8f45e7c5b743f492a0e869652f130b47 Mon Sep 17 00:00:00 2001 From: Joseph Lord Date: Sat, 25 Jul 2015 23:41:29 +0100 Subject: [PATCH 2/2] left() wasn't working as ambiguous between func and default arg. --- .../Sources/What a Turtle Understands/TurtleHeading.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Turtle.playground/Sources/What a Turtle Understands/TurtleHeading.swift b/Turtle.playground/Sources/What a Turtle Understands/TurtleHeading.swift index 4bbecd4..d3bc247 100644 --- a/Turtle.playground/Sources/What a Turtle Understands/TurtleHeading.swift +++ b/Turtle.playground/Sources/What a Turtle Understands/TurtleHeading.swift @@ -15,7 +15,7 @@ public func right() { // MARK: - left - -public func left(degrees: Double = 90) { +public func left(degrees: Double) { turtle.increaseHeadingBy(-degrees) }