DPS923 & MAP523

Mobile App Development for iOS

Notes Topics Weekly Resources Graded work Professor Code examples

DPS923 MAP523 Week 4 Notes

Thursday, January 23 - classroom lecture
Monday, January 27 - hands-on in the computer-lab

This week, we begin to learn how to design and create a substantial app with many features, now that you have some good foundation skills and techniques.

Thursday plan

Plan for this week:

Here is information about the upcoming test.

Here is information about deployment.

Here is information that introduces a navigation style app.

Here is information that introduces the data model essentials topic.

Designing and implementing a substantial multi-scene app

Until today, the apps we have created, and the apps that you have coded, have had one “scene”.

From the docs, a scene represents an onscreen content area.
As a code asset, it is a custom XML syntax, and is managed by Xcode during development, and by iOS at runtime, so we never have to work directly with the code asset as programmers. On iOS, a scene fills the screen.
And, you have learned that a scene is paired with a controller.

From now on, it is likely that all of the apps will have multiple scenes. App design is more important now.

When we write “app design”, we do NOT mean its visual or graphic design. Instead, we are interested in how the app’s code is designed in a way that conforms to guidance, best practices. That typically means a modular design, with known responsibilities, separation of concerns, and well-defined interfaces.

As a result, BEFORE we begin coding, we must perform some tasks. After a few weeks, you have learned how to code the basics, and you’re ready for this topic. The tasks include:

Code examples

The course’s GitHub repo has code examples for many topics and techniques. You can download a zip of the code repo, or clone it.

Monday plan

In the first part of the timeslot, Test 1 will be written. Here is information about the upcoming test.

Then, in the remaining time, work on the programming assignment, and get help from a classmate or the professor if you need it.


Here’s a list of topics that we learned something about this week:

  1. App “design” refresher; modular code, separation of concerns
  2. The value of sketching (hand drawing) the scenes in an app
  3. Navigation interface style of app intro and characteristics
  4. Apple’s definition of a scene
  5. Segues between scenes
  6. Navigation controller introduction
  7. Nav controller is a “container”, and manages a sequence of view controllers, organized as a stack
  8. Nav controller manages the navigation bar, with three standard areas (left, center, right)
  9. Setting the title that appears in the nav bar center; the procedure for the first controller is a bit different from the others
  10. Navigation interface segue kind/type is “Show”
  11. On the storyboard, the nav controller is the app’s “entry point”
  12. Segue must be triggered by a user interaction event (button, table view row selection)
  13. We must follow a “prepare pattern” before segueing (transitioning) to the next controller
  14. This preparation is done in the hosting/triggering controller, in the prepare(for: sender:) method
  15. Developers build iOS apps by following the MVC pattern
  16. Controllers can “mediate” (e.g. our view controller subclasses), “coordinate” (e.g. app delegate), or “model” (e.g. data model manager)
  17. Data model communicates with a controller
  18. Data model is implemented in code with typically two source code files; one defines the data entity shapes, and the other manages the data service operations (setup, import/export, persist, CRUD, transform)
  19. iOS app creates a single instance of a data model manager, and ensures that it is passed among controllers