---
title: "ios的helloworld"
author: "haoningabc"
date: "2014-09-08T19:51:42Z"
tags: ["iOS"]
categories: ["开源软件"]
slug: "ios-helloworld"
draft: false
lastmod: "2014-09-08T19:51:42Z"
id: 2114125
url: "https://haoningabc.iteye.com/blog/2114125"
---

参考http://www.macx.cn/thread-2104805-1-1.html
.h

```java

#import <UIKit/UIKit.h>

@interface FirstViewController : UIViewController


-(IBAction)showMessagezhege;
@end

```

.m

```java

#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


```