Skip to content

Commit

Permalink
Change playground target platform to macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mattt committed Jan 27, 2019
1 parent a2a1641 commit 450b736
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Chapter 3/Pixel.playground/Contents.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import Foundation

let encoder = JSONEncoder()
encoder.userInfo[.colorEncodingStrategy] =
ColorEncodingStrategy.hexadecimal(hash: true)
encoder.userInfo[.colorEncodingStrategy] = ColorEncodingStrategy.hexadecimal(hash: true)

let cyan = Pixel(red: 0, green: 255, blue: 255)
let magenta = Pixel(red: 255, green: 0, blue: 255)
Expand All @@ -11,4 +10,5 @@ let black = Pixel(red: 0, green: 0, blue: 0)

let json = try! encoder.encode([cyan, magenta, yellow, black])
let string = String(data: json, encoding: .utf8)!

print(string)
2 changes: 1 addition & 1 deletion Chapter 3/Pixel.playground/contents.xcplayground
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playground version='5.0' target-platform='ios'>
<playground version='5.0' target-platform='macos'>
<timeline fileName='timeline.xctimeline'/>
</playground>

0 comments on commit 450b736

Please sign in to comment.