ios的helloworld

参考http://www.macx.cn/thread-2104805-1-1.html
.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


猜你喜欢

转载自haoningabc.iteye.com/blog/2114125