参考http://www.macx.cn/thread-2104805-1-1.html
.h
.m
.h
#import <UIKit/UIKit.h>
@interface FirstViewController : UIViewController
-(IBAction)showMessagezhege;
@end
.m
#import "FirstViewController.h"
@interface FirstViewController ()
@end
@implementation FirstViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (IBAction)showMessagezhege
{
UIAlertView *helloWorldAlert = [[UIAlertView alloc]
initWithTitle:@"this is the first" message:@"first" delegate:nil cancelButtonTitle:@"cancel." otherButtonTitles:nil];
[helloWorldAlert show];
}
@end