What happened at the 43:40 minute mark? It looks like a good chunk was cut out. Sam was in the middle of talking about what was going to happen, then - BOOM - he was in the middle of typing code?
Hiya,
You’re correct in noticing that we’ve lost some content in the edit - I’m guessing that there might have been some technical difficulties. Or I was deeply offensive…
Anyway, I can assure that you didn’t lose much. That point was very close to the end of the slides - just introducing gesture recognisers. As you continue to watch the video you’ll get pretty much the same info in a more practical format.
sam
Thanks. I did watch the rest and did follow along without a problem! Also, you’re explaination of content hugging etc in your other video was the best I’ve seen, thanks!
1 Like
Very good explanations, great pedagogical value ! Thank you Sam !!!
1 Like
Testing with the latest xCode (Version 8.0 (8A218a)), Swift 3.0, and the following code:
fileprivate func updateFillColor() {
let toColor = selected ? selectedColor.cgColor : color.cgColor
if !CGColorEqualToColor(toColor, fillColor) {
let animation = CABasicAnimation(keyPath: “fillColor”)
animation.fromValue = fillColor
animation.toValue = toColor
add(animation, forKey: “fillColor”)
fillColor = toColor
}
}
Get’s an error saying "CGColorEqualToColor is unavailable: Use == instead CircleLayer.swift.
Is this expected? (I’ve tried to just compile the finished project using the convert to swift 3.0 settings.
Hi @theapapp
Swift 3 introduces a much nicer API for CoreGraphics, and that includes for comparisons. I think you will probably be able to fix it by replacing the 3rd line with:
if toColor != fillColor {
...
}
Hope that helps
sam
1 Like