Learning Swift in Xcode 6.1 -
I am currently learning swift from a tutorial video using Xcode 6.0 The code was given to me to edit as a read, however, the code seems old already, for example, I am getting syntax errors for this sentence:
var ViewData = NSData.dataWithContentsOfMapFiled (path !, option: .data reading mAPIs, error: zero) // Error: Additional logic 'option' in call
Keep in mind that I'm very new to programming and fast. Vata. I have seen the differences between 6.0 and 6.1 and a great description of all the changes can not be found
This tutorial I am following is following.
P>
There are two types of code in your code, especially Datavid contentsfff file should be DataWithContentsOfMappedFile . However, it has also been marked as deprecated (see) and does not provide the argument option: . Therefore, you have to replace it dataWithContentsOfFile: option: error: (see). Personally, I think it would be best if you have a look at the documentation and decide which method is best what you want to achieve.
Comments
Post a Comment