Health App Beg

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


Video Walkthrough

Table of contents

Before you begin

  1. Create a new iOS project
  2. Save it as Health App Beg
  3. Download these images and save them to your assets folder on your XCode project.

Required Features

Overview

There will be two ViewControllers: HomeViewController & ResultViewController. HomeViewController will collect information from the user and ResultViewController will display the information that was collected from the HomeViewController.

HomeViewController

Video Walkthrough

  • 4 UIButtons with images of: Happy, Sad, Surprised, and Angry
  • UISegmentedControl for gender
  • 3 UITextFields: 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 the ResultViewController -- do this VISUALLY.

ResultViewController

Video Walkthrough

  • UILabels that display information for the user's: mood, gender, full name, height, weight, and date of birth.
  • Add gray background color to some UILabels appropriately.

Hints

Saving Mood

Video Walkthrough

Set image programatically

Video Walkthrough

Working with UISegmentedControl

if segmentedControl.selectedSegmentIndex == 0 {
  // do something
} else if segmentedControl.selectedSegmentIndex == 1 {
  // do something else
} else {
  // do something else
}

Dismiss Keyboard

Video Walkthrough

Formatting Date

let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "MM/dd/yyyy"
let dateString = dateFormatter.string(from: ```DATE OBJECT GOES HERE```) // <---- THIS IS YOUR STRING