简体   繁体   中英

Xcode 6.1 componentsSeparatedByCharacterInSet Compiler Error

to be able to deploy an App onto an iPhone with IOS 8.1 I updated Xcode 6.0.1 to 6.1.

With this step I got a couple of compiler errors, eg

var lines : NSArray = mydata.componentsSeparatedByCharactersInSet(NSCharacter.newlineCharacterSet())

Error:

Cannot convert the expression's type '$T6??' to type '[AnyObject]'

What is '$T6??

Figured out that I need an explicit cast as [NSArray]

var lines : NSArray = mydata.componentsSeparatedByCharactersInSet(NSCharacter.newlineCharacterSet()) as [NSArray]

But still don't know, what '$T6??' stands for. Google did not help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM