나는 이것을 .hUIButton에서 UILabel로 텍스트 레이블 지정하기
IBOutlet UILabel *display;
에서 선언했다. .m 다음과 같은 일을하고 있지만 작동하지 않는다는 것은 displat.text가 null이라는 것을 계속 말하고있다. 당황 스럽네, 도와 줘! 예, 나는 멍청한 행동입니다.
NSLog(@"operation button pressed %@ is of class %@",[[sender titleLabel] text],[[[sender titleLabel] text] class]);
NSString *operation = [[sender titleLabel] text];
[display setText:operation];
NSLog(@"display text is of class %@ and equals %@",[display.text class], [display text]);
또한 다음과 같이 시도 :
NSLog(@"digit button pressed %@ is of class %@",[sender currentTitle],[[sender currentTitle] class]);
display.text = (NSString *)[[sender titleLabel] text];
NSLog(@"display text is of class %@ and equals %@",[display.text class], [display text]);
NSLog() 문을 여기에 뿌렸으므로 ... 실행 로그에 출력되는 내용은 무엇입니까? –