-(IBAction) secondTwoSlotSettings: (id)sender{
UIAlertView *secondTwoSlotSettings = [[UIAlertView alloc] initWithTitle:@""
message:@""
delegate:self
cancelButtonTitle:@"キャンセル"
otherButtonTitles:@"2スロット カメラ",@"2スロット カメラロール", nil];
[secondTwoSlotSettings show];
}
-(IBAction) firstTwoSlotSettings: (id)sender{
UIAlertView *firstTwoSlotSettingsMessage = [[UIAlertView alloc] initWithTitle:@""
message:@""
delegate:self
cancelButtonTitle:@"キャンセル"
otherButtonTitles:@"1スロット",@"2スロット", nil];
[firstTwoSlotSettingsMessage show];
}
-(IBAction) oneSlotSettings: (id)sender{
UIAlertView *oneSlotSettingsMessage = [[UIAlertView alloc] initWithTitle:@""
message:@""
delegate:self
cancelButtonTitle:@"キャンセル"
otherButtonTitles:@"カメラ",@"カメラロール", nil];
[oneSlotSettingsMessage show];
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
NSString *title = [alertView buttonTitleAtIndex:buttonIndex];
if([title isEqualToString:@"キャンセル"])
{
NSLog(@"キャンセル was selected.");
}
else if([title isEqualToString:@"はい"])
{
NSLog(@"はい was selected.");
}
else if([title isEqualToString:@"2スロット カメラ"])
{
NSLog(@"2スロット カメラ was selected.");
}
else if([title isEqualToString:@"1スロット"])
{
NSLog(@"1スロット was selected.");
}
else if([title isEqualToString:@"2スロット"])
{
NSLog(@"2スロット was selected.");
UIAlertView *oneSlotSettingsMessage = [[UIAlertView alloc] initWithTitle:@""
message:@""
delegate:self
cancelButtonTitle:@"キャンセル"
otherButtonTitles:@"2スロット カメラ",@"2スロット カメラロール", nil];
[oneSlotSettingsMessage show];
}
else if([title isEqualToString:@"カメラ"])
{
NSLog(@"カメラ was selected.");
}
else if ([title isEqualToString:@"カメラロール"])
{
NSLog(@"カメラロール was selected.");
}
这是我的代码:
我只能显示 firstTwoSlotSettings 和 oneSlotSettings。但是当我尝试显示 secondTwoSlotSettings 它消失了。