3
나는 2 UIAlert가 표시됩니다. 나는 버튼을 누릅니다. 첫 번째 확인 단추를 눌렀을 때 첫 번째 UIAlert가 해제 될 때만 두 번째 경고가 표시되도록하고 싶습니다.2 UIAlertView 다른 하나 다음에
어떻게 진행해야합니까? 아래 코드는
- (IBAction)button:(id)sender {
UIAlertView *view;
view = [[UIAlertView alloc]
initWithTitle: @"Message"
message: @"Adding..."
delegate: self
cancelButtonTitle: @"OK" otherButtonTitles: nil];
[view show];
MyAppAppDelegate *appDelegate = (MyAppAppDelegate *)[[UIApplication sharedApplication] delegate];
if (appDelegate.array_presets.count) {
view = [[UIAlertView alloc]
initWithTitle: @"Message"
message: @"limit already reached"
delegate: self
cancelButtonTitle: @"OK" otherButtonTitles: nil];
[view show];
}
[view autorelease];
}
당신은 아마 "경우"경우 (alertView.tag! = 1000) '두 번째에'사용하거나 (1001) 같은 다른 값을 확인하는 것을 의미하지만 내 생각은, 포스터의 문제가 해결되지 않습니다 . – DarkDust
고마워. 답변에서 코드를 편집했습니다. 첫 번째 경보가 해제 된 후 두 번째 경고보기를 표시하려고 할 때 문제가 해결되어야한다고 생각합니다. – lukya