相关疑难解决方法(0)

故事板不会在模拟器中更新

我有一个工作的应用程序Xcode,但是当我尝试构建并运行它时,模拟器显示我正在处理的故事板的旧版本.我改变了故事板上的一些设计,但这并没有反映在模拟器中,没有更新.

有没有人有任何想法?

xcode storyboard ios ios-simulator

16
推荐指数
3
解决办法
1万
查看次数

performSegueWithIdentifier没有发起诅咒

我的performSegueWithIdentifier方法的实现不是启动segue.

我已经尝试通过在方法之前和之后放置print语句进行调试:它在之前打印,而不是之后打印,这显然表明该方法不起作用,对吧?

class ViewController: UIViewController{

    var signupActive = true

    @IBOutlet weak var username: UITextField!
    @IBOutlet weak var password: UITextField!

    var errorMessage = "Please try again later"

    func displayAlert(title: String, message: String) {

        let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.Alert)
        alert.addAction((UIAlertAction(title: "Ok", style: .Default, handler: { (action) -> Void in
            self.dismissViewControllerAnimated(true, completion: nil)
        })))

        self.presentViewController(alert, animated: true, completion: nil)

    }

    @IBAction func signUp(sender: AnyObject) {

        if username.text == "" || password.text == "" {

            displayAlert("Error in form", message: "Please …
Run Code Online (Sandbox Code Playgroud)

ios uistoryboard segue uistoryboardsegue swift

5
推荐指数
1
解决办法
613
查看次数