-(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.");
}
Here is my code:
I was only able to show the firstTwoSlotSettings and oneSlotSettings. but when I try to show the secondTwoSlotSettings it vanish.
No It is not possible with Apple’s UIAlertView. When you present an alertView ,it will come modal to all other views and dismiss any other Alerts already present in the screen.
One thing you can do is to create a custom View as your alert and animates its present/dismiss action? Then you have the control to do whatever you want..