Created
December 29, 2020 04:56
-
-
Save KrauserHuang/2fe321f62e30da7fcb19e17ed22fc4af 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
@IBSegueAction func showResult(_ coder: NSCoder) -> ResultViewController? { | |
let sex = sexSegmented.titleForSegment(at: sexSegmented.selectedSegmentIndex) ?? "Male" | |
let age = ageTextField.text! | |
let height = heightTextField.text! | |
let weight = weightTextField.text! | |
let activitySelection = activityButtonText.titleLabel?.text ?? "Sedentary(office job)" | |
let controller = ResultViewController(coder: coder) | |
controller?.bmrInfo = BmrInfo(sex: sex, age: age, height: height, weight: weight, activitySelection: activitySelection) | |
return controller | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment