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 trialAlphonse Yang
7,830 Pointsdot notation method
I am using the Xcode 6.1 GM, and I found that some dot notation methods couldn't be found in the Xcode, for example, the NSString.stringWithContentsOfURL().. But if I use the constructor, there's a similar function, is that because of the swift update?
1 Answer
Jaroslaw Oleksy
4,992 PointsI think the line should go like this in Xcode 6.1:
var urlContents = NSString(contentsOfURL: location, encoding: NSUTF8StringEncoding, error: nil)
Sebastiano Sessa
285 PointsSebastiano Sessa
285 PointsIt seems like there have been several updates to Swift and the videos have yet to be updated to reflect these changes. I'm having lots of problems following these trainings since most of the time I need to stop and do some research to find the latest syntax...