我在 Xcode 4.3 中编码时遇到了一件奇怪的事情。标题中描述了问题的性质。我在另一篇文章中提到了这一点以及故事板连接问题。连接问题似乎至少现在已经消失了。但是价值分配问题仍然存在。所以我把它作为一个新帖子。
-(void) setQuestion:(NSString *)question
{
_question = question;
self.questionLabel.text = question;
NSLog(@"The quesion is %@",question);
NSLog(@"The quesion label text is %@",self.questionLabel.text);
}
NSLog 的结果:
2012-07-29 04:03:53.817 Kitchen Sink[18628:f803] The quesion is What do you want your label to say?
2012-07-29 04:03:53.820 Kitchen Sink[18628:f803] The quesion label text is (null)
任何想法?