use outlet in xcode 5

67 Views Asked by At

I added property statusText in veiwcontroller

@interface ViewController : UIViewController
@property (nonatomic, retain) IBOutlet UILabel *statusText;, 

@synthesize statusText;

- (IBAction)buttonPressed:(id)sender {
    NSString *title = [sender titleForState:UIControlStateNormal];
    NSString *newText = [[NSString alloc] initWithFormat:
                             @"%@ кнопка нажата.", title];
    [statusText setText:newText];

joined the label and outlet, but when i debug it statusText is nil. Why?

i try some kind ways, but statusTex is nil anyway

0

There are 0 best solutions below