Xcode first start

Screen Shot 2556-07-08 at 10.55.44 AM

 

//------------------------------

Screen Shot 2556-07-08 at 11.02.43 AM

//  ViewController.h
//  MyApp1
//  Created by Guest User on 7/8/56 BE.
//  Copyright (c) 2556 Petcharaporn. All rights reserved.

#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
- (IBAction)mybutton:(id)sender;
@property (strong, nonatomic) IBOutlet UILabel *Mylabel;
@property (strong, nonatomic) IBOutlet UITextField *mytext;
@end

------------------------------------------------------------------------------

#import "ViewController.h"
@interface ViewController ()
@end

------------------------------------------------------------------------------

@implementation ViewController
@synthesize Mylabel;
- (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)mybutton:(id)sender {
Mylabel.text=@"Hello";
}
@end
--------------------------------result---------------------------------------

after press My button

show "Hello

Screen Shot 2556-07-08 at 11.08.22 AM

 

 

Bookmark the permalink.

Comments are closed.