车展:Auto Show or Motor Show
手动挡:MT(Manual Transmission)
自动挡:AT(Automatic Transmission)
手自一体:AMT(Automated Mechanical Transmission)
档位:P(Parking) R(Reverse) N(Neutral) D(Drive)
@implementation HelloWorldViewController
// I've removed other methods for better reading. Focus on the showMessage method first.
- (IBAction)showMessage
{
UIAlertView *helloWorldAlert = [[UIAlertView alloc]
initWithTitle:@"My First App" message:@"Hello, World!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
// Display the Hello World Message
[helloWorldAlert show];
}
@end
正如你上面所示,你使用“@implementation”去声明一个实现。在“showMessage”中,代码用于定义在屏幕中弹出一条警告。你不需要弄明白在“showMessage”的方法中每一行代码具体含义。简单来说,创建了一个以“My First App” 为标题,“Hello, World”作为消息的UIAlertView。然后调用“show”方法去请求iOS用于在屏幕上显示一个弹出消息。如下图所示: