Module Outline
Use the following resources and work with your mentor to master the objectives for this module. Practice by completing the Mini-Project, Project, and Challenges.
Objectives
- You will be able to implement intermediate Table View features
Custom Cells, Custom Delegate, External DataSource, Editing Styles, Static Tableviews, Header/Footer Views, Enums, Reusing TableViewControllers
Lesson Video
Preclass Videos
-
iOS5 Cohort - Taylor Mott
Intermedidate Tableviews - shortened version
-
iOS5 Cohort - Taylor Mott
Intermediate Tableviews - long version
Video Challenges
-
EditingStyle
Create a UITableView that allows you to delete and reorder UITableViewCells. Give a custom section header view and multiple sections. Use an enum and a switch statement to distinguish between sections.
As a black diamond, create a custom UITableViewCell with a UITextField that uses a custom delegate to tell the Datasource or ViewController that the text has changed within the UITextField.
Stretch Problem
- Make a constant called
currentYear
that is an integer equal to the current year (e.g. 2016). - Create a Person struct with properties for first name as a
String
, last name as aString
, and year of birth as anInt
. - Create an instance of the
Person
struct - Print out the instance's birth year
- Print out its first and last name
- Add a computed property for
age
to thePerson
struct - Implement a getter for
age
. The getter should calculate and return the person's age based on the current year and the person's year of birth. (Hint: Look up getters in the Swift programming guide or in documentation). - Implement a setter for
age
. The setter should update the year of birth based on the age and current year. (Hint: look up setters). - Print out the person's age
- Update their age and then print their new year of birth.
Custom Properties
PART 1
PART 2
♦ Black Diamond
Guided Project
Settings
Settings is a project designed to help students practice working with intermediate table view concepts, creating protocols, and implementing MVC patterns.
Project
-
Alarm Part One
Students will build a simple alarm app to practice intermediate table view features, protocols, the delegate pattern, NSCoding, UILocalNotifications, and UIAlertControllers.
ReadMe
Mastery Review
- Custom Properties stretch problem
- Challenges
- EditingStyle objective challenge
- Settings guided project