Comment faire pour convertir rapidement une Chaîne de CFString

Comment puis-je créer un CFString d'un natif swift Chaîne ou NSString dans swift

    let path:String = NSBundle.mainBundle().pathForResource(name.stringByDeletingPathExtension, ofType:"pdf")
    let string:CFString = ??? path
    let url:CFURLRef = CFURLCreateWithFileSystemPath(allocator:kCFAllocatorDefault, filePath:string, pathStyle:CFURLPathStyle.CFURLPOSIXPathStyle, isDirectory:false)
  • Dans ce cas, pourquoi ne pas simplement utiliser let url = NSURL.fileURLWithPath(path, isDirectory:false)
  • ils sont tous reliés, les jeter
  • que voulez-vous dire?
  • Je comprends, mais je pense que c'est un IOS question et non seulement à moi, je suppose...merci
InformationsquelleAutor loopmasta | 2014-06-06