CS193P - Lecture 11
iPhone Application Development
Text Input
Presenting Content Modally
1Wednesday, February 10, 2010
Announcements
•
Paparazzi 3 assignment is due Wednesday 2/17
•
This Friday’s extra session will feature Evan Doll
2Wednesday, February 10, 2010
Today’s Topics
•
Threading Wrap-Up
•
iPhone Keyboards
•
Customizing Text Input
•
Presenting Content Modally
3Wednesday, February 10, 2010
NSOperation
•
Abstract superclass
•
Manages thread creation and lifecycle
•
Encapsulate a unit of work in an object
•
Specify priorities and dependencies
5Wednesday, February 10, 2010
Creating an NSOperation Subclass
•
Define a custom init method
•
Override -main method to do work
- (id)initWithSomeObject:(id)someObject
{
self = [super init];
if (self) {
self.someObject = someObject;
}
return self;
}
- (void)main
{
[someObject doLotsOfTimeConsumingWork];
}
6Wednesday, February 10, 2010