Let the label display variable values on screen
2013-02-27 15:39
288 查看
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) IBOutlet
UILabel *targetLabel;
- (void)updateLables
{
self.targetLabel.text = [NSString
stringWithFormat:@"%d",
targetValue];
}
- (void)viewDidLoad
{
[super
viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
[self
startNewRound];
[self
updateLables];
}
pp84
1 Create a reference to the label so we can send it messages.
2 Give the label new text to display
@property (nonatomic,
strong) IBOutlet
UILabel *targetLabel;
- (void)updateLables
{
self.targetLabel.text = [NSString
stringWithFormat:@"%d",
targetValue];
}
- (void)viewDidLoad
{
[super
viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
[self
startNewRound];
[self
updateLables];
}
pp84
相关文章推荐
- How do I set the DISPLAY variable on Linux
- print numbers on the screen.(show_str and dtoc function)
- How to dynamically display the tips or help on the text box
- Linux 平台 Oracle 安装 报错 Check if the DISPLAY variable is set 解决方法
- Understand on the tf.variable_scope and tf.name_scope
- Clothes moths are on the march and heading your way - let the battle begin!
- F4 help functionality for a dynpro screen field using the PROCESS ON VALUE-REQUEST statement
- sikuli core: Finding GUI Patterns on the Screen
- 查询的时候Tomcat打印You can change this value on the server by setting the max_allowed_packet' variable解决方法
- Animate to display a dialog message box in the right-bottom of the window screen
- Get the F4 help of a field based on the value of another field in the selction screen(联动的搜索帮助)
- 解决Mysql You can change this value on the server by setting the max_allowed_packet' variable. 异常
- Notes 8.5.1 on the Koala(Notes5.2.1 on ubuntu11.04 windows display error repair)
- How to sort a Map<Key, Value> on the values in Java?
- 第491篇-Get the window position on the screen
- 23. Can't connect to X11 window server using '127.0.0.1:0.0' as the value of the DISPLAY variable.解决办法
- Thinkpad T61 on screen display 设置
- Tap anywhere on the screen to continue
- Centering window on the screen
- C++ SDL教程翻译 Lesson 02 Getting an Image on the Screen