我想更改登录屏幕userName Outlet,但它无法正常工作我找不到我们的解决方案
handlers:
- url: /assets
static_dir: dist/assets
login: required
- url: /dist
static_dir: dist
login: required
- url: /.*
script: app.server.main.app
secure: always
login: required
答案 0 :(得分:0)
试试这个:
let loginVC = storyboard?.instantiateViewController(withIdentifier: "LoginViewController") as! LoginViewController
if self.emailTextField.text == ""
{
loginVC.str = "Hello"
}
else
{
loginVC.str = self.emailTextField.text!
}
navigationController?.pushViewController(loginVC, animated: true)
<强> LoginViewController 强>
class LoginViewController: UIViewController
{
var str:String! = nil
override func viewDidLoad()
{
super.viewDidLoad()
self.userName.text = str
}
}