NSString
세 개 (UITextField
개 3 개) 3 개의 코드를 사용하여 UILabel
:데이터 용 UITextfield 세 개를 확인한 다음 작업 수행
-(IBAction)numberEntered:(id)sender
{
if (dayEntry != nil && monthEntry !=nil && yearEntry !=nil){
NSString *day=[NSString stringWithFormat:@"%@/%@/%@", dayEntry, monthEntry, yearEntry];
[dateOutput setText: day];
}
}
는 기본적으로 나는 if
문이 코드의 [dateOutput setText: Day]
라인을 실행하기 전에 모든 텍스트 필드는 데이터를 입력했는지 확인하고 싶다.
처음에는 UITextField
(예 : dayEntry)에 숫자를 입력하자마자 작동합니다.
"편집 완료"로 각 UILabel
에서 조치가 호출됩니다.
을 신난다, 내가 찾고 있었던 정확하게 그 것이다. 감사! – Jonnybellman