CS 329E Assignment 4


Assignment 4: GUI and Code



Project Description

This assignment takes the GUI interface you created in Assignment 3 and add functionality using the Swift programming language. You will allow users to enter a name and city, and display back this entry, along with all previous entries.

Basic Requirements

You will then implement the following functionality for your project:
  1. Implement a Text View that can display all current name and city entries (one per line) with the following format: "Name: [Name], City: [City]". This Text View should not be editable.
  2. Allow text fields for Name and City entries to dismiss the keyboard when the user clicks Done.
  3. Implement an internal data structure (your choice) to store the user's name and city entries, so all entries that were made during the current app execution will be displayed with the Text View.
  4. Implement functionality for the Save button to store new entries in the existing internal data structure.
  5. Users should not be able to save an entry that does not have text entered for both Name and City. Upon successfully saving, the text fields for Name and City should erase their current content.
The final output (after several entries are added) will look something like this:

Getting Started

You may start by creating a copy of yourid_assignment3. To do this, follow these instructions to rename your Xcode project and targets and also rename the folder itself to yourid_assignment4. That said, Xcode projects store a lot of meta-data that can make it difficult to rename correctly. It may be easier to create a new project and redo the Interface Builder work rather than try to copy it over. There is also a Xcode project renamer script that may be helpful if you feel comfortable working with scripts.

After you have a working interface, you will need to modify the View Controller code for this assignment.

What to turn in

You will submit a zip of the project folder, yourid_assignment4, that contains the file folder with code, assets, and yourid_assignment4.xcodeproj via Canvas.


Last modified: 08/09/19 by Sarah Abraham theshark@cs.utexas.edu