Skip to content

Commit

Permalink
update color property by using #colorLiteral in playground
Browse files Browse the repository at this point in the history
  • Loading branch information
czars committed Oct 17, 2016
1 parent a5065f8 commit a820b5f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions Tribute.playground/Contents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ import XCPlayground
let string = NSMutableAttributedString()
.add("Tribute is a ") {
$0.font = .systemFontOfSize(15)
$0.color = [#Color(colorLiteralRed: 0.8504372835, green: 0.2181603462, blue: 0.1592026055, alpha: 1)#]
$0.color = #colorLiteral(red: 0.8504372835, green: 0.2181603462, blue: 0.1592026055, alpha: 1)
}
.add("micro") {
$0.obliqueness = 0.2
$0.underline = .StyleSingle
$0.color = [#Color(colorLiteralRed: 0.7608990073, green: 0.2564961016, blue: 0, alpha: 1)#]
$0.color = #colorLiteral(red: 0.7608990073, green: 0.2564961016, blue: 0, alpha: 1)
}.add(" library") {
$0.underline = nil
$0.color = [#Color(colorLiteralRed: 0.8526210189, green: 0.4221832156, blue: 0, alpha: 1)#]
$0.color = #colorLiteral(red: 0.8526210189, green: 0.4221832156, blue: 0, alpha: 1)
}.add(" for ") {
$0.obliqueness = nil
$0.color = [#Color(colorLiteralRed: 0.9767052531, green: 0.605463922, blue: 0, alpha: 1)#]
$0.color = #colorLiteral(red: 0.9767052531, green: 0.605463922, blue: 0, alpha: 1)
}
.add([#Image(imageLiteral: "swift@2x.png")#], bounds: CGRect(x: 0, y: -8, width: 30, height: 30))
.add(#imageLiteral(resourceName: "swift@2x.png"), bounds: CGRect(x: 0, y: -8, width: 30, height: 30))
.add("\nIt simplifies"){
$0.reset()
$0.color = [#Color(colorLiteralRed: 0.5948907137, green: 0.7498663664, blue: 0, alpha: 1)#]
$0.color = #colorLiteral(red: 0.5948907137, green: 0.7498663664, blue: 0, alpha: 1)
$0.alignment = .Center
}
.add(" ")
Expand All @@ -33,7 +33,7 @@ let string = NSMutableAttributedString()
}.add("\nNSAttributedStrings") {
$0.URL = nil
$0.font = UIFont(name: "Courier", size: 14)
$0.color = [#Color(colorLiteralRed: 0.1819814891, green: 0.6942673326, blue: 0.5302479267, alpha: 1)#]
$0.color = #colorLiteral(red: 0.1819814891, green: 0.6942673326, blue: 0.5302479267, alpha: 1)
$0.textEffect = .Letterpress
}

Expand All @@ -58,6 +58,6 @@ let label = UILabel()
label.attributedText = s
label.numberOfLines = 0
label.sizeToFit()
label.backgroundColor = [#Color(colorLiteralRed: 0.9607843136999999, green: 0.9607843136999999, blue: 0.9607843136999999, alpha: 1)#]
label.backgroundColor = #colorLiteral(red: 0.9607843136999999, green: 0.9607843136999999, blue: 0.9607843136999999, alpha: 1)
page.liveView = label

8 changes: 4 additions & 4 deletions Tribute.playground/timeline.xctimeline
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
version = "3.0">
<TimelineItems>
<LoggerValueHistoryTimelineItem
documentLocation = "#CharacterRangeLen=6&amp;CharacterRangeLoc=2044&amp;EndingColumnNumber=7&amp;EndingLineNumber=63&amp;StartingColumnNumber=1&amp;StartingLineNumber=63&amp;Timestamp=471046648.498675"
documentLocation = "#CharacterRangeLen=6&amp;CharacterRangeLoc=1992&amp;EndingColumnNumber=7&amp;EndingLineNumber=63&amp;StartingColumnNumber=1&amp;StartingLineNumber=63&amp;Timestamp=498410473.940178"
selectedRepresentationIndex = "0"
shouldTrackSuperviewWidth = "NO">
</LoggerValueHistoryTimelineItem>
<LoggerValueHistoryTimelineItem
documentLocation = "#CharacterRangeLen=0&amp;CharacterRangeLoc=2037&amp;EndingColumnNumber=7&amp;EndingLineNumber=56&amp;StartingColumnNumber=1&amp;StartingLineNumber=56&amp;Timestamp=471046648.498858"
documentLocation = "#CharacterRangeLen=0&amp;CharacterRangeLoc=1985&amp;EndingColumnNumber=7&amp;EndingLineNumber=56&amp;StartingColumnNumber=1&amp;StartingLineNumber=56&amp;Timestamp=498410473.94043"
lockedSize = "{175, 242}"
selectedRepresentationIndex = "0"
shouldTrackSuperviewWidth = "NO">
</LoggerValueHistoryTimelineItem>
<LoggerValueHistoryTimelineItem
documentLocation = "#CharacterRangeLen=6&amp;CharacterRangeLoc=1505&amp;EndingColumnNumber=7&amp;EndingLineNumber=39&amp;StartingColumnNumber=1&amp;StartingLineNumber=39&amp;Timestamp=471045139.477629"
documentLocation = "#CharacterRangeLen=6&amp;CharacterRangeLoc=1461&amp;EndingColumnNumber=7&amp;EndingLineNumber=39&amp;StartingColumnNumber=1&amp;StartingLineNumber=39&amp;Timestamp=498410428.36509"
lockedSize = "{472, 201}"
selectedRepresentationIndex = "0"
shouldTrackSuperviewWidth = "NO">
</LoggerValueHistoryTimelineItem>
<LoggerValueHistoryTimelineItem
documentLocation = "#CharacterRangeLen=0&amp;CharacterRangeLoc=2037&amp;EndingColumnNumber=2&amp;EndingLineNumber=64&amp;StartingColumnNumber=1&amp;StartingLineNumber=64&amp;Timestamp=471046648.499103"
documentLocation = "#CharacterRangeLen=0&amp;CharacterRangeLoc=1985&amp;EndingColumnNumber=2&amp;EndingLineNumber=64&amp;StartingColumnNumber=1&amp;StartingLineNumber=64&amp;Timestamp=498410473.94083"
selectedRepresentationIndex = "0"
shouldTrackSuperviewWidth = "NO">
</LoggerValueHistoryTimelineItem>
Expand Down

0 comments on commit a820b5f

Please sign in to comment.