Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPaul M
16,370 PointsWhat do I do with CocoaPods in Swift 3?
I keep trying to follow his instructions and it didn't work with Swift 3, if I use Swift 2, I won't be able to run the app. But if I do, I get a bunch of errors from the framework. Does anyone have any ideas what I should do for Swift 3 and iOS 10?
1 Answer
Brian Bochicchio
19,978 PointsThanks Roger, that answer was spot on!
I had to update Hue and change the syntax as you demonstrated above.
Roger Antonell
18,252 PointsRoger Antonell
18,252 PointsWith Swift 3 you have to download the version 2.0.1 in the Podfile, here you have all the content of the Podfile:
then the framework isn't throwing more errors, but the content for the function applyBackgroundGradient for swift 3 and hue 2.0.1 is this:
finally call the function in the viewDidLoad and you have nice gradient as background.