DPS923 & MAP523

Mobile App Development for iOS

Notes Topics Weekly Resources Graded work Professor Code examples

DPS923 MAP523 Week 3 Notes

Thursday, January 16 - classroom lecture
Monday, January 20 - hands-on in the computer-lab

The theme for this week is to continue with interaction topics, which keep building upon your recent knowledge and experience.

Thursday plan

Plan for this week:

Here is information about alerts and action sheets.

Here is information about two-dimensional graphics and touch.

Here is information about photo library and camera.

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

Finish the photo library and camera topic we started on Thursday.

Then, 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. Creating UI objects in code (instead of using the storyboard and object library)
  2. Get the attention of the user with an alert or action sheet
  3. Introduction to a “modal view” and its meaning
  4. Gentle introduction to the Apple Human Interface Guidelines, and how they help and guide us to make good design and coding decisions
  5. Gentle introduction to closures in Swift, including their purpose and their generalized syntax
  6. Difference in appearance and interaction between the alert and the action sheet
  7. Similarities in the coding of both (i.e. the sequence of coding steps)
  8. Role and purpose of a UIAlertAction object, and the role and purpose of a UIAlertController object
  9. The iOS SDK has five frameworks for graphics; we will introduce UIKit and Core Graphics topics
  10. The concept of creating a view (UIView subclass) programmatically, as a container for graphics content
  11. A UIView subclass includes initializers and a draw(_:) method
  12. The concept of layering, where the display hierarchy is composed of “layers”, window, view, subviews
  13. Create bitmap graphics with an in-memory graphics context
  14. Coordinate system on iOS starts in upper-left, and is measured in points (not pixels)
  15. Rich touch support, known as gestures (tap, swipe, etc.)
  16. UIGestureRecognizer base class is used to detect and act upon guestures
  17. Using the camera and photo library also requires a programmatically-created controller, UIImagePickerController
  18. This controller also requires a delegate to respond to messages (pick/use photo, cancel)
  19. Must have permission from the user; this is configured in info.plist settings
  20. On the storyboard, a UIImageView UI object is used to display an image or photo