Das Kennworttextfeld verbirgt die Passwortzeichen nicht als Punkte.Sequre Text innerhalb von UITextField
import UIKit
import Firebase
import FirebaseDatabase
class signupViewController: UIViewController {
@IBOutlet weak var email: UITextField!
@IBOutlet weak var password: UITextField!
@IBOutlet weak var signup: UIButton!
@IBOutlet weak var cancel: UIButton!
var databaseref = FIRDatabase.database().reference()
override func viewDidLoad() {
super.viewDidLoad()
signup.enabled = true
}
@IBAction func didtapcancel(sender: AnyObject) {
dismissViewControllerAnimated(true, completion: nil)
}
@IBAction func didtapsignup(sender: AnyObject) {
signup.enabled=true
FIRAuth.auth()?.createUserWithEmail(email.text!, password: password.text!, completion: {(user,error) in
if error != nil {
if error!.code == 17999 {
let alert = UIAlertController(title: "error 17999", message: "ohh", preferredStyle: UIAlertControllerStyle.Alert)
alert.addAction(UIAlertAction(title: "click", style: UIAlertActionStyle.Default, handler: nil))
self.presentViewController(alert, animated: true, completion: nil)
}
else {
print(error?.localizedDescription)
let alert = UIAlertController(title: "error ", message: "tt", preferredStyle: UIAlertControllerStyle.Alert)
alert.addAction(UIAlertAction(title: "click", style: UIAlertActionStyle.Default, handler: nil))
self.presentViewController(alert, animated: true, completion: nil)}
}
else
{
FIRAuth.auth()?.signInWithEmail(self.email.text!, password: self.password.text!, completion: {(user,error) in
if (error == nil) {
self.databaseref.child("users").child(user!.uid).child("email").setValue(self.email.text!)
self.performSegueWithIdentifier("ahmed", sender: nil)
}
})
}
}
)}
}
Und Ihre Frage ist .... –
warum ist es nicht nicht Benutzer erstellen in Firebase-Datenbank und warum der Passcode nicht als Punkte erscheint –
versuchen Sie 'password.isSecureTextEntry = true' in 'viewDidLoad' – Joe