Skip to content

Class roster app created for Code Fellows' Foundations II class

Notifications You must be signed in to change notification settings

willrichman/classRoster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Class roster app created for Code Fellows' Foundations II class.

Instructions were as follows:

Part 1:

    1) Create a Person class with a firstName and lastName property (String).
    2) Create an optional property for an image (UIImage).
    3) Create an initializer that takes in two parameters, a string for firstName and string for lastName
    4) Create a fullName() function to return the Person's firstName and lastName as one String
    5) Add a new method to your ViewController to initialize an Array of Person(s) with each person from class
    6) Embed your View Controller in a Navigation Controller:
            from your Storyboard, click your yellow ViewController object
            click the Editor menu
            choose Embed In -> Navigation Controller
    7) Create a button on your ViewController in Storyboard and connect it to another View Controller using a Show segue (previously known as push segue).

    Advanced Challenge (not mandatory):

    1) Using Apple's documentation as a guide, load in the array of Person objects from a .plist file in your bundle

Part 2:

    1) Add a UITableView to your main ViewController
    2) Set your ViewController as the dataSource and delegate of your UITableView
    3) Implement the required UITableViewDataSource methods in your ViewController
    4) Display the fullName of a given student in each UITableViewCell
    5) Create a second UIViewController subclass called DetailViewController
    6) Segue to a DetailViewController when the user selects a tableview cell

    Challenge:

    1) Pass the Person object from the ViewController to the DetailViewControllerDisplay the firstName and lastName properties in the DetailViewController
    2) Make the firstName and lastName UITextFields editable and save any changes to the Person object in the viewWillDisappear: method on your DetailViewController
    3) Display an image for the user in the DetailViewController
    4) Don't forget to have your tableView reloadData in your main ViewController's viewWillAppear: method

Part 3:

    1) Create a way to pass the selected person to the detail view controller.  The detail view controller should display both the first name and last name of the selected person. You can use a label or a text field for this.
    2) Make it so your tableview has 2 sections, one for students and one for teachers.

    Extra Challenges:

    1) Create an interface that lets the user add a person to the tableview.
    2) Persist these added people with NSKeyedArchiver. (The NSHipster article about NSKeyedArchiver is great)
    3) Add a way to take a person's photo on the detail view controller. Look into UIIMagePickerController.

About

Class roster app created for Code Fellows' Foundations II class

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published