Home > 2010 Fall DPS913 > DPS913 lecture notes Thu Sep 16

DPS913 lecture notes Thu Sep 16

September 16, 2010 Leave a comment Go to comments

After completing the detailed introductions to Objective-C and Cocoa in the last two class sessions, we will begin creating iOS apps today. A thorough introduction to views and user interface elements is featured today. We’ll also get started with user interaction, and data type conversion for common operations.


Prepare for today’s class

Show up on time. Be alert and mentally agile. Be prepared to learn.

If you wish, you can look at some of the introductory readings in the DPS913 Virtual Textbook.

And, you can go through the digital content linked below.


Coming up in DPS913 / APD601

Mon Sep 20 – lecture topics continued

Thu Sep 23 – begin data persistence topics; Lab 1 is due at the beginning of class

Mon Sep 27 – lecture topics continued



In the last class session, we introduced the Interface Builder (IB) development tool. We used it to create a very simple app that had no interaction or other functionality – it simply displayed “Hello, world!” on the screen.

At the beginning of today’s session, we continue by covering some IB highlights. Please refer to the “Apple development toolset introduction for SCS students” blog post (or handout) for details. The highlights covered today include the following:

The MVC design pattern enforces the requirement to place user interface (UI) elements in the view, which is contained in the nib file (with the .xib extension). Code that supports the user interface is placed in the controller, which is the <appname>ViewController file pair (.h and .m).

The key concepts that enables you to “connect” view and view controller objects together are outlets and actions.

An outlet is an instance variable that refers to another object. Another way of saying this is that (frequently) an outlet is (typically) a reference to a user interface object. Here’s how you create an outlet: In your view controller code (using XCode), you declare a property, and designate it to be an outlet. In your view (using IB), you connect a user interface element to the outlet.

The IBOutlet type qualifier (macro) is used to designate an outlet in your view controller code. The IBOutlet type qualifier appears before the type name in the property declaration.

An action is a message-passing relationship between a user interface control (which is a user interface element that supports the generation of events) and a designated “action” method that’s typically located in a view controller. The method is located in a “target”, so this concept is often referred to as “target/action”.

The IBAction type qualifier (macro) is used as the method’s return type when the method is declared.

We’ll see all of these highlights in action today, in the notes, and in the code examples.


Blog posts for today’s class


iOS app structure and startup

Views, view controllers, and user interface elements

Building a simple app

Get started with data conversions and keyboard handling


Categories: 2010 Fall DPS913
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: