data source

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 1; } - (UITableViewCell *)tableView:(UITableVi...

2013-02-28 23:15:34

阅读数 297

评论数 0

Checklists

This is the second app How it looks like pp2 : a to-do list The app lets you organise to-do items into lists and then check off these items once yo...

2013-02-28 22:19:40

阅读数 333

评论数 0

Communicate between objects

By Matthijs When you have two objects A and B, says two view controllers, that you want to make talk to each other, you can choose from the followin...

2013-02-28 20:30:05

阅读数 286

评论数 0

Add a simple crossfade

Add a simple crossfade after the Start Over button is pressed, so the transition back to round one  won't seem so abrupt. pp146 #import ...

2013-02-28 01:04:35

阅读数 261

评论数 0

Loads the local HTML file into the web view in the app

- (void)viewDidLoad {     [super viewDidLoad];     // Do any additional setup after loading the view from its nib.          NSString *h...

2013-02-28 00:22:41

阅读数 426

评论数 0

AboutView -- Close the second window

1 Set the Action in the second window 2 in .m file, implement the - (IBAction)close method. pp 120 // AboutViewController.m -(IBAction)clos...

2013-02-27 21:15:20

阅读数 185

评论数 0

AboutView -- Create the second window in the app

1. create the second window by new file -> objective-C class (subclass of ViewController). then .xib, .h and .m 2. set Action in the first view ...

2013-02-27 20:54:21

阅读数 220

评论数 0

Action methods vs. normal methods

The difference between an action method and a regular method: Nothing. An action method is really just the same as any other method. The only specia...

2013-02-27 15:47:28

阅读数 274

评论数 0

Let the label display variable values on screen

To do that, we need to accomplish two things: 1 Create a reference to the label so we can send it messages. 2 Give the label new text to display ...

2013-02-27 15:39:17

阅读数 230

评论数 0

Generating the random number

You can't really get a computer to generate numbers that are truly random and unpredictable, but we can employ a so-called pseudo-random generator to...

2013-02-27 12:17:21

阅读数 256

评论数 0

Properties vs instance variables

Properties and instance variables have a lot in common. In fact, when you use @synthesize to create the property, it is "backed" by an ivar...

2013-02-27 12:03:04

阅读数 263

评论数 0

Properties and Outlets

These three steps are necessary for just about any property you add to the view controller if that property refers to a view in the nib: 1 add @prop...

2013-02-27 11:47:06

阅读数 206

评论数 0

ViewDidLoad

Do some setup after loading the view, typically from a nib. - (void)viewDidLoad {     [super viewDidLoad]; // Do any additional setup afte...

2013-02-27 10:23:41

阅读数 287

评论数 0

lroundf() and sliders

We use the function lroudf() to round the decimal number to the nearest whole number. - (IBAction)sliderMoved:(UISlider *)slider {     currentV...

2013-02-27 09:48:38

阅读数 1476

评论数 0

Converting the app to landscape

To convert our app from portrait into landscape, we have to do three things: 1 Make the view from BullsEyeViewController.xib landscape instead of po...

2013-02-26 23:09:54

阅读数 373

评论数 0

Point and Pixel

So what is a point? On the iPhone 3GS and earlier models, as well as the corresponding iPod touch models and the iPad 1 and 2(including mini?), one p...

2013-02-26 21:01:18

阅读数 456

评论数 0

UIKit and other frameworks

iOS offers a lot of building blocks in the form of frameworks or "kits". The UIKit framework provides the user interface controls such as b...

2013-02-26 20:48:28

阅读数 198

评论数 0

How does an app work?

On iOS, apps are event-driven, which means that the objects listen for certain events tooccur and then process them. As strange as it may sound, an a...

2013-02-26 20:35:42

阅读数 265

评论数 0

AlertView

- (IBAction)showAlert { UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Hello,World" ...

2013-02-26 20:09:33

阅读数 294

评论数 0

Bull's Eye

If you have the imagination and perseverance there is no limit to what you can make these cool little devices do. pp16 start the first app Bull'...

2013-02-26 19:59:55

阅读数 457

评论数 0

提示
确定要删除当前文章?
取消 删除
关闭
关闭