gpt4 book ai didi

ios - 如何根据条件创建转场

转载 作者:行者123 更新时间:2023-11-28 13:12:02 24 4
gpt4 key购买 nike

<分区>

我有一个由 Parse 支持的登录页面。我想知道如何仅在通过 Parse 数据库确认登录后才创建 segue,然后将用户定向到新的 View Controller。

这是登录按钮的代码:

@IBAction func logginginAction(sender: AnyObject) {

var username = self.usernameField.text
var password = self.passwordField.text

if (count(username.utf16) < 4 || count(password.utf16) < 5 ) {

var alert = UIAlertView(title: "Invalid", message: "Username/Password is too short!!", delegate: self, cancelButtonTitle: "OK")
alert.show()
}
else {
self.actInd.startAnimating()

PFUser.logInWithUsernameInBackground(username, password: password, block: { (user, error) ->
Void in

self.actInd.stopAnimating()

if ((user) != nil) {

}else {
var alert = UIAlertView(title: "Invalid", message: "Please recheck the information you just entered", delegate: self, cancelButtonTitle: "OK")
alert.show()

}
})
}


}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com