jeudi 26 mai 2016

swift: access variable inside else statement

I'm trying to access a variable I'm creating in if statement in else. For example:

if let filePath: NSURL = documentDirectory.URLByAppendingPathComponent("myFile.txt"){

But I can't access to the variable filePath in else block:

enter image description here Any of you knows how can access the variable filePath inside the else block?

I'll really appreciate your help

Aucun commentaire:

Enregistrer un commentaire