samedi 9 mai 2015

String is nil with Parse.com in Swift 1.2

I've searched on many question but I haven't found my answer... Before my code was working pretty well, but it was before Swift 1.2... Could you help me to know why : Could not find an overload for '!=' that accepts the supplied arguments

    var user = PFUser.currentUser()
    UserName.text = user!.username
    UserEmail.text = user!.email
    if (user["phone"] != nil)
    {
        UserPhone.text = user["phone"] as! NSString as String
    }
    else
    {
        UserPhone.text = "Unknow"
    }

Aucun commentaire:

Enregistrer un commentaire