Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on keyboardDidHide #1

Closed
attilakis opened this issue Jan 12, 2016 · 1 comment
Closed

Crash on keyboardDidHide #1

attilakis opened this issue Jan 12, 2016 · 1 comment

Comments

@attilakis
Copy link

Sorry, I cannot explain the issue better than sharing my code snippet.

Here is my code

let dialog = ZAlertView(title: "Elfelejtett jelszó", message: "Adja meg az email címét", alertType: ZAlertView.AlertType.MultipleChoice)

dialog.addTextField("emailField", placeHolder: "E-mail cím")

dialog.addButton("Küldés", color: UIColor(rgb: Constants.tabBarColor), titleColor: UIColor.whiteColor(), touchHandler: { (alertView) -> () in

    alertView.dismiss()

    PFUser.requestPasswordResetForEmailInBackground(alertView.getTextFieldWithIdentifier("emailField")!.text!, block: { (success, error) -> Void in

        if let error = error {
            ParseErrorHandlingController.handleParseError(error)
        } else {

            ZAlertView.positiveColor = UIColor(rgb: Constants.tabBarColor)

            let successDialog = ZAlertView(title: "Információ", message: "Az e-mailt sikeresen elküldtük", alertType: ZAlertView.AlertType.Alert)

            successDialog.show()
        }
    })
})

dialog.addButton("Mégsem", color: UIColor.lightGrayColor(), titleColor: UIColor.whiteColor(), touchHandler: { (alertView) -> () in
    alertView.dismiss()
})

dialog.show()

And here is the issue (somehow the self.oldFrame is nil)

fatal error: unexpectedly found nil while unwrapping an Optional value

screen shot 2016-01-12 at 19 16 53

@zelic91
Copy link
Owner

zelic91 commented Jan 16, 2016

This happens when you run the app on Simulator. There's a hot fix for this in 0.1.3.

@zelic91 zelic91 closed this as completed Jan 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants