iPhone SDK重新加载UIView的内容
我有两个视图,一个视图占据整个屏幕,第二个视图仅覆盖一小部分。我想要的是第二个视图位于第一个视图上(我已经完成了),但问题是,当我设置值(在本例中为 UILabel)时,屏幕上的标签不会显示该新值。我知道该方法确实被调用,但由于某种原因它不会改变标签的值。
编辑:这是代码:
-(void)loadHighScores
{
[no1 setText:@"test"];
NSLog(@"it works");
}
这就是我如何称呼它:
highscore = [[HighScore alloc] init];
[highscore loadHighScores];
I have two views, one view takes the whole screen, the second view covers only a little portion. What I want is for that second view to be on the first view (which I already have done), but the problem is, when I set values (in this case UILabel's) the label on the screen doesn't display that new value. I know for a fact the method gets called, but for some reason it won't change the label's value.
Edit: Here's the code:
-(void)loadHighScores
{
[no1 setText:@"test"];
NSLog(@"it works");
}
And here's how I call it:
highscore = [[HighScore alloc] init];
[highscore loadHighScores];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过:
引用Apple文档:
Have you tried:
Quote from Apple docs: