Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8030311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:43:28+00:00 2026-06-05T00:43:28+00:00

I have an Iphone application in which when i am pressing a button it

  • 0

I have an Iphone application in which when i am pressing a button it shows an alertview to chose the background.whichever background user is chosing will be played as the background of the audio clips.But now i need to add another alert before i am showing this alert for giving some warning.after that only i need to pop the second one.but i was done that chosing alert in the didappear of that viewcontroller and set it as a Uialertview delegate.and on the button actions i was doing different actions.Can anybody help me on achieving this?

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;



}

how can i include another alert before this is my question?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T00:43:30+00:00Added an answer on June 5, 2026 at 12:43 am

    Initialize first Alertview

    UIAlertView *al1 = [[UIAlertView alloc] initWithTitle:@"Warning!" message:@"Warning Msg!!!" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles: nil];
    al1.tag=1;
    al1.delegate=self;
    [al1 show];
    

    Implement Delegate method

    -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
        if(alertView.tag==1){
            // implement button events for first Alertview
            if(buttonIndex==1){
                //First button clicked of first Alertview
                UIAlertView *al2 = [[UIAlertView alloc] initWithTitle:@"Choose BG" message:@"Choose BG?" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"1",@"2",@"3", nil];
                al2.tag=2;
                al2.delegate=self;
                [al2 show];
            }
    
        }
    
        if(alertView.tag==2){
            // implement button events for second Alertview
            if(buttonIndex==1){
                // First button clicked second Alertview.
            }
        }
    }
    

    Controller Class header

    @interface ViewController : UIViewController<UIAlertViewDelegate>{
    
    }
    

    Hope this will fulfill your need !

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iPhone application which will exit on it's own after a user
I have an IPhone application in which i want to change the background image
I have developed an iphone application which will be available in Apple Store in
Background: I have an iPhone application for which I want the launch image to
I am developing an iPhone Application in which i have provide Pin Annotation button
I have an iphone application in which in a button click i am showing
I have an iPhone application in which I would like to give the user
I have Iphone application in which i wanted to use Non_Renewable subscriptions.As per docs
I have an iphone application which has about 4 tabs. How do I force
I have an iPhone application which basically is getting information from an API (in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.