ios - SWIFT code dataWithContentsOfFile broken with update to XCode 6.1 -
Since the following two lines of code are compiled errors in the latest update of XCode, do I re-compile and run the program Can advise to make adjustments for?
var view data = NSData.dataWithContentsOfFile (path, option: .dataReadingMappedIfSafe, error: zero) var archiver = NSKeyedUnarchiver (forReadingWithData: sceneData) archiver.setClass (for self.classForKeyedUnarchiver () Classname: "SKNN") Any help would be appreciated, thanks.
you (iOS <8.0)
NSData.dataWithContentsOfMappedFile (Path) can use or (iOS> = 7.0)
var ViewData = NSDTA (contentoffile: path, option: .dataindingmapIsF, Error: Zero) If you create a new Spritekit sample project in XCode 6.1, you will see the change.
Comments
Post a Comment