Код взят из Stanford CS193p. Я добавил NSLog, чтобы проверить это. Метка, кажется, не инициализируется. Есть идеи?
@interface AskerViewController() <UITextFieldDelegate>
@property (weak, nonatomic) IBOutlet UILabel *questionLabel;
@property (weak, nonatomic) NSString *question;
@end
@implementation AskerViewController
@synthesize questionLabel = _questionLabel;
@synthesize question = _question;
- (void)setQuestion:(NSString *)question
{
_question = question;
self.questionLabel.text = question;
NSLog(@"label is %@", self.questionLabel);
}
@end
Результат NSLog:
2012-07-31 01:56:45.177 Kitchen Sink[23931:f803] label is (null)
setQuestion:
не инициализирует метку. Он только устанавливает текст. Инициализирована ли метка? Розетка подключена в Interface Builder? - person Adam   schedule 30.07.2012