//------------------------------
// 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