UINavigationController

摘要: This type of interface is called a drill-down interface.UINavigationControllerWhen your application presents multiple screens of information, UINavigationController maintains a stack of those screens. The stack is an NSArray of view controllers, and each screen is the view of a UIViewController. Whe 阅读全文
posted @ 2012-06-16 13:47 grep 阅读(487) 评论(0) 推荐(0) 编辑

UITableVIew and UITableViewController

摘要: UITableView is a view object, so, according to Model-View-Controller, it knows how to draw itself, but that's it.UITableView needs a data source to ask for data, a delegate to inform events involving the UITableView, and typically a view controller to create and destroy instance of UITableView.a 阅读全文
posted @ 2012-06-16 10:55 grep 阅读(1420) 评论(0) 推荐(0) 编辑

Notification

摘要: an object can post notification about what is going on to a centralized notification center. Interested objects register to receive a message when a particular notification is posted or when a particular object posts.Notification centerEvery application has an instance of NSNotificationCenter, which 阅读全文
posted @ 2012-06-16 00:36 grep 阅读(446) 评论(0) 推荐(0) 编辑

The accelerometer

摘要: The accelerometer detects the devices's real-world orientation by tracking the force of the earth's gravity on its X, Y, and Z axes. You can also use accelerometer data to detect changes in the device's velocity.Setting up the accelerometerTo receive accelerometer data, your application 阅读全文
posted @ 2012-06-15 19:17 grep 阅读(209) 评论(0) 推荐(0) 编辑

UIView

摘要: Every UIView subclass implements the method drawRect:, which contains the drawing code for the view.For example, a UIButton's drawRect: method draws a rounded rectangle with a title string in the center.Each time an instance of UIView needs to be drawn (or redrawn), the system prepares a graphic 阅读全文
posted @ 2012-06-15 13:37 grep 阅读(416) 评论(0) 推荐(0) 编辑

Theory and Practice

该文被密码保护。 阅读全文
posted @ 2012-06-15 10:33 grep 阅读(4) 评论(0) 推荐(0) 编辑

View Controller

摘要: Each controller has a view that gets placed on the window. (The view often has subviews like buttons and labels.) Thus, we call these controllers view controllers.- (BOOL)application:(UIApplication *)applicationdidFinishLaunchingWithOptions:(NSDictionary *)launchOptions{self.window = [[UIWindow allo 阅读全文
posted @ 2012-06-14 09:59 grep 阅读(281) 评论(0) 推荐(0) 编辑

MapKit

摘要: declare the MapPoint conforms to MKAnnotation.#import <Foundation/Foundation.h>#import <CoreLocation/CoreLocation.h>#import <MapKit/Mapkit.h>@interface MapPoint : NSObject <MKAnnotation>{ NSString *title; CLLocationCoordinate2D coordinate;}//a new designated initializer for i 阅读全文
posted @ 2012-06-13 22:56 grep 阅读(221) 评论(0) 推荐(0) 编辑

delegation

摘要: A delegate is an object referenced using Objective-C’s anonymous type, id.Delegate messages usuallyinclude one of three verbs: should, will, or did.You could try polling the location manager to get the location, but the amount of time it takes to determine the current location is too variable for po 阅读全文
posted @ 2012-06-13 15:07 grep 阅读(509) 评论(0) 推荐(0) 编辑

ios connection

摘要: There are six connections between your QuizAppDelegate and other objects.You've set ist pointers answerField and questionField to point at the lables. That's two.The QuizAppDelegate is the target for both buttons, That's four.The project's template made two additional connections.Fir 阅读全文
posted @ 2012-06-13 13:48 grep 阅读(208) 评论(0) 推荐(0) 编辑