iPhone and iPad SDK Programming Class

Programming the Apple iPhone and iPad devices using the IOS SDK can be challenging for beginners, but rewarding. This class covers a broad overview of iPhone and iPad programming, including a coverage of Objective-C, UIKit framework, and other frameworks needed for successful completion of iOS projects.


Lecture 4 - More UITableView and delegation

In this lecture, delegation was discussed in more detail. A homebrew delegate property was built from scratch in the sample delegate-tutorial-ios-UCLA-201202.zip .

UITableView was discussed in more detail, particularly recycling the UITableViewCell rather than building a new one with Alloc/Init each time. Custom UITableViewCell objects were shown to be just specialized UIView objects that can be customized like any other UIView.




Specialized UIView objects are abundant in UIKit. We looked at some of the properties of UIImageView and UIScrollView in the ios-tableview-tutorial-UCLA-201202.zip demo, and how some of these views can be used in custom UITableViewCell objects.







This link to the Ray Wenderlich site has been both really helpful in completing specific tasks as well as an inspiration for app ideas. Check it out:
http://www.raywenderlich.com/tutorials


Homework 4: Customizing UITableView

The purpose of this homework assignment is to gain more practice working with UITableView and UITableViewCell objects. Understanding of these concepts will be fundamental to many(most?) applications on iPhone and iPad.

Create an iPhone application. Add a UITableView to the screen that displays data you have stored as NSDictionary objects in an NSArray. Subclass UITableViewCell, and add custom views to the cell that best display the NSDictionary objects found in your array.



Lecture 3 - Foundation Classes, drawing to the screen, delegation introduction

In this lecture, Foundation classes are covered in more detail. The design patterns of delegation that allows objects to communicate with each other was discussed. The delegate design pattern is demonstrated through implementation of a basic UITableView object.

This link to the Cocoa Fundamentals Guide at developer.apple.com is largely targeted to the Mac platform. It is a nice overview of the communication mechanisms found in Cocoa:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/CommunicateWithObjects.html

George sent me this link to a youtube video showing some shortcuts in Interface Builder:
http://www.youtube.com/watch?v=ORy8hwXress&feature=plcp&context=C3c0e342UDOEgsToPDskK5VMsUoGDiEwsIodGSDYce

Many of the concepts from lecture 3 are revisited in the video covering UITableView below.
http://s3.amazonaws.com/certifiednetworks/video/iphone-sdk/ios-editable-uitableview-tutorial.mp4 1024x768 78MB 14:58



Homework 3: Investigating delegation and the UITableView

The purpose of this homework assignment is to gain more practice working with Objective-C and the Foundation classes. Additionally, it will help you to become more familiar with delegation and the UITableView class. Hopefully you will have fun with the assignment and will experiment outside of the homework requirements, for example by adding a custom view to the UITableviewCell or by changing the appearance of the cell. This one could take up some time as some of the concepts may be unfamiliar.

Create an iPhone or iPad application using either the window-based or the view-based template. Add a UITableView to the screen that displays data you have stored in an NSArray. After you get it working, use the appropriate delegate method to change the height of each UITableViewCell to be 100 points. This assignment will take some time, but will be a foundation for many iphone projects. See the EditableTableView.zip xcode project for a good example of the elements required.



Lecture 2 - Objective-C, Foundation Classes and UIViews

In this lecture, Objective-C concepts were reviewed. Foundation classes such as NSString were discussed. The UIView runtime hierarchy was demonstrated.

UCLA_Day2_Demo201201 project was created during class to demonstrate placing UIViews onto the screen.









Homework 2: UIViews
Create an iPad application with three UIViews overlapping one another. Set the alpha property of the views such that the view on the bottom is still visible. Try completing the project both in code and with Interface Builder.



Lecture 1 - iPhone/iPad Platform and Objective-C

In this lecture, the iOS Platform is introduced using the iPad and iPhone. The Objective-C language and its basic elements was introduced.

Objective-C is an extension of the ANSI C language which has been extended to include certain features centered around object oriented programming.

The following Objective-C extensions that are discussed and should be reviewed: @interface, @class, @property, [] (square brackets), #import, - (minus sign to mark an instance method), + (plus sign to mark an instance method).

UCLA_Day1_Demo project was created during class to demonstrate some of these concepts. See the readme.txt file in the iOS project for more information.









Homework 1: Getting Started
Send me an email with iOS in the subject line.
Read 'Learning Objective-C: A Primer' from Apple listed below.
Install the iOS SDK and XCode.
Create an iphone application using the view-based template. Display "Hello, World." on an instance of a UILabel. See UCLA_2012_HelloWorld.zip for a completed solution to the homework assignment.

Apple Documentation - Objective-C, A Primer. http://developer.apple.com/iphone/library/referencelibrary/GettingStarted/Learning_Objective-C_A_Primer/


XCode Projects - Class Demos, Examples and Homework Answers

Slides

Class Logistics

Previous Versions of iPhone and iPad iOS Development class

home services classes iphone Links to our partner and affiliate sites Contact Us Search Site Map Terms of Use Privacy Policy Client Directories