Crear PDF en Swift
Estoy siguiendoDocumentos de Apple crear un archivo PDF usando Xcode6-Beta6 en Swift
var currentText:CFAttributedStringRef = CFAttributedStringCreate(nil, textView.text as NSString, nil)
if (currentText) { // <-- This is the line XCode is not happy
// More code here
}
Lanzamientos del compiladorType 'CFAttributedStringRef' does not conform to protocol 'BooleanType'
error
Si yo usoif(currentText != nil)
yo obtengo'CFAttributedStringRef' is not convertible to 'UInt8'
De los documentos de Apple paraCFAttributedStringCreate
Return Value
An attributed string that contains the characters from str and the attributes specified by attributes. The result is NULL if there was a problem in creating the attributed string. Ownership follows the Create Rule.
¿Alguna idea de cómo resolver esto? ¡Gracias!