NoteCell
클래스를 만들었습니다.UILabel에 텍스트 필드를 설정할 수 없습니다.
- (void)setNote:(Note *)newNote {
note = newNote;
NSLog(@"Text Value of Note = %@", newNote.noteText);
self.noteTextLabel.text = newNote.noteText;
NSLog(@"Text Value of Note Text Label = %@", self.noteTextLabel.text);
[self setNeedsDisplay];
}
이것은 UILabel
의 텍스트 필드와 로그 메시지의 출력을 설정하는 데 실패 : 나는 setNote:
방법에 대한 다음과 같은 코드를 구현에서
#import <UIKit/UIKit.h>
#import "Note.h"
@interface NoteCell : UITableViewCell {
Note *note;
UILabel *noteTextLabel;
}
@property (nonatomic, retain) UILabel *noteTextLabel;
- (Note *)note;
- (void)setNote:(Note *)newNote;
@end
: 헤더는 다음을 정의 입니다 :
2008-11-03 18:09:05.611 VisualNotes[5959:20b] Text Value of Note = Test Note 1
2008-11-03 18:09:05.619 VisualNotes[5959:20b] Text Value of Note Text Label = (null)
나는 또한 다음과 같은 구문을 사용하여 UILabel
의 텍스트 필드를 설정하는 데 노력했다 :
[self.noteTextLabel setText:newNote.noteText];
이것은 차이가없는 것처럼 보입니다.
도움을 주시면 감사하겠습니다.
빠른 응답 주셔서 감사합니다. 문제는 바로 해결되었습니다. 나는 그것을 발견하지 못했다고 믿을 수 없다. 나는 이것을 한시간 꼼짝 않고 바라 보았고, 코드 블라인드에 가기 시작했다. – lucasweb