Created
December 29, 2020 04:38
-
-
Save KrauserHuang/d4330fe771cb566164672255556712e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func shouldPerformSegue(withIdentifier identifier: String, sender: Any?) -> Bool { | |
if ageTextField.text?.isEmpty == false, | |
heightTextField.text?.isEmpty == false, | |
weightTextField.text?.isEmpty == false, | |
activityButtonText.titleLabel?.text?.isEmpty == false { | |
return true | |
} else { | |
let controller = UIAlertController(title: "Please fill in all the blank", message: "You need to fill all the blank to calculate your BMR & TDEE", preferredStyle: .alert) | |
let okAction = UIAlertAction(title: "OK", style: .default, handler: nil) | |
controller.addAction(okAction) | |
present(controller, animated: true, completion: nil) | |
return false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment