Health App Beg is an iOS app (for beginners) that receives health information from patients and displays result for doctor to see.
Time to develop (beginners): 2-4 hours
- Create a new iOS project
- Save it as
Health App Beg
- Download these images and save them to your assets folder on your XCode project.
There will be two ViewController
s: HomeViewController
& ResultViewController
. HomeViewController
will collect information from the user and ResultViewController
will display the information that was collected from the HomeViewController
.
- 4
UIButtons
with images of: Happy, Sad, Surprised, and Angry UISegmentedControl
for gender- 3
UITextField
s: full name, height, and weight UIDatePicker
for date of birth (remember to set 'mode' to 'Date' on the attribute inspector)UIButton
at the very bottom that takes users to theResultViewController
-- do this VISUALLY.
UILabels
that display information for the user's: mood, gender, full name, height, weight, and date of birth.- Add gray background color to some
UILabel
s appropriately.
if segmentedControl.selectedSegmentIndex == 0 {
// do something
} else if segmentedControl.selectedSegmentIndex == 1 {
// do something else
} else {
// do something else
}
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "MM/dd/yyyy"
let dateString = dateFormatter.string(from: ```DATE OBJECT GOES HERE```) // <---- THIS IS YOUR STRING