Let the label display variable values on screen

来源:互联网 发布:360软件小助手 编辑:程序博客网 时间:2024/06/05 06:45

To do that, we need to accomplish two things:

1 Create a reference to the label so we can send it messages.

2 Give the label new text to display


@property (nonatomic,strong) IBOutletUILabel *targetLabel;


- (void)updateLables

{

    self.targetLabel.text = [NSStringstringWithFormat:@"%d",targetValue];

}



- (void)viewDidLoad

{

    [superviewDidLoad];

// Do any additional setup after loading the view, typically from a nib.

    

    [selfstartNewRound];

    [selfupdateLables];

}


pp84