그물을 검색했지만 답변을 찾지 못했습니다. 내 앱에 사용자 등록이되어 있으므로 사용자를 수락하기 전에 입력 텍스트 필드를 확인해야합니다.여러 오류가 동일한 UIAlertView에 표시됩니다.
여기 내 코드입니다 :
- (IBAction)continueRegister:(id)sender {
if (!termsOfUseChecked)
NSLog(@"Error");
else
NSLog(@"Success");
if ([_regTelephoneNumber.text length] > 10) {
[self initWithTitle:@"error" andMessage:@"bla bla" andCancelButton:@"ok"];
}
if ([_regUserEmail.text rangeOfString:@"@"].location == NSNotFound){
[self initWithTitle:@"error" andMessage:@"bla bla" andCancelButton:@"ok"];
}
if (![_regPassword.text isEqualToString:_regConfirmPassword.text]) {
[self initWithTitle:@"error" andMessage:@"bla bla" andCancelButton:@"ok"];
}
}
-(void)initWithTitle:(NSString*)title andMessage:(NSString*)message andCancelButton:(NSString*)cancelButton;
{
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:title message:message delegate:self cancelButtonTitle:cancelButton otherButtonTitles:nil, nil];
[alert show];
}
하지만 더 이상의 오류가 발생하면 사용자가 많은 팝 업을. 동일한 UIAlertview에서 모든 오류를 표시 할 수있는 방법이 있습니까?
대단히 감사합니다. – OshriALM