我有一个iPhone应用程序,当我按下一个按钮时,它会显示一个警告框来选择背景。无论用户选择哪种背景,都将作为音频剪辑的背景播放。但现在我需要在显示此警告之前添加另一个警告,以便发出一些警告。之后只需要弹出第二个。但是我在那个视图控制器的didappear中完成了选择警报,并将其设置为Uialertview delegate。在按钮操作上,我正在执行不同的操作。有人可以帮助我实现这个吗?
proAlertView *loginav1=[[proAlertView alloc] initWithTitle:@"title" message:@"Choose a Background to play with this program?" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Field",@"Beach", @"Stars",nil];
[loginav1 setBackgroundColor:[UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:1.0] withStrokeColor:[UIColor colorWithHue:0.625 saturation:0.0 brightness:0.8 alpha:0.8]];
[loginav1 show];
- (void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
// the user clicked one of the OK/Cancel buttons
if (buttonIndex == 0)
{
//[self play];
//moviePlayer.scalingMode=MPMovieScalingModeAspectFill;
if(actionSheet.tag==123)
{
[self backButtonPressed];
}
}
else if (buttonIndex == 1)
{
videoFile = [[NSBundle mainBundle] pathForResource:@"video-track" ofType:@"mp4"];
[self play];
moviePlayer.scalingMode=MPMovieScalingModeAspectFill;
}
在这之前加入另一个提示框应该怎么做?