如下是报错需要修改的源码:
// if count(currentPassword) < 6 || count(newPassword) < 6 || count(confirmPassword) < 6 { // var failAlertView = UIAlertView(title: Localized.ACCOUNT_HINT_PASSWORD , message: nil, delegate: self, cancelButtonTitle: Localized.DIALOG_BUTTON_OK) // failAlertView.show() // return // }
修改如下:
1 func setPassword(currentPassword: String, newPassword: String, confirmPassword: String) { 2 3 //may 4 5 if currentPassword.characters.count < 6 || newPassword.characters.count < 6 || confirmPassword.characters.count < 6 { 6 7 let failAlertView = UIAlertView(title: Localized.ACCOUNT_HINT_PASSWORD , message: nil, delegate: self, cancelButtonTitle: Localized.DIALOG_BUTTON_OK) 8 9 failAlertView.show() 10 11 return 12 13 }