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 6384183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:44:38+00:00 2026-05-25T02:44:38+00:00

alright so i have a small problem here, i have this here. – (void)alertView:(UIAlertView

  • 0

alright so i have a small problem here, i have this here.

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
    if (buttonIndex == 0)
    {
        //YES clicked ...do your action
        [self.parentViewController dismissModalViewControllerAnimated:YES];
    }
    else if (buttonIndex == 1)
    {
        //NO clicked
        return;
    }
}

This Allows me to capture events triggered from UIAlertView Buttons but i have assigned it a value and on the same page i need another value to be assigned to that class so:

if(buttonIndex == 2){//Proceed}

i mainly want it so that when the button is pushed on my second alert it will go back to the processes it was doing and not proceed with the event of (buttonIndex == 0).

So Does anyone know Where i could start?

  • 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-05-25T02:44:39+00:00Added an answer on May 25, 2026 at 2:44 am

    Just store a reference in you .h file of the 2 UIAlertView‘s, and then do a check. For instance, in your .h file:

    UIAlertView * alertView1;
    UIAlertView * alertView2;

    In your .m file, set up your UIAlertView‘s in you viewDidLoad method, and change the alertView:clickedButtonAtIndex: method to:

    - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex; {
      if (alertView == alertView1) {
        // Do what you want the alertView1 to do here.
        if (buttonIndex == 0) {
        //YES clicked ...do your action
         [self.parentViewController dismissModalViewControllerAnimated:YES];
        }
        else if (buttonIndex == 1) {
    
        }// etc.
      }
      else if (alertView == alertView2) {
        // Do what you want the alertView2 to do here.
      }
    }
    

    Hope that Helps!

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

Sidebar

Related Questions

Alright so I have this C++ image capturing class. I was wondering if I
Alright. I have a query that looks like this: SELECT SUM(`order_items`.`quantity`) as `count`, `menu_items`.`name`
Alright, so I have a query that looks like this: SELECT `orders`.*, GROUP_CONCAT( CONCAT(
Alright, currently I have my SWF hitting a php file that will go and
Alright, I have been doing the following (variable names have been changed): FileInputStream fis
Alright. So I have a very large amount of binary data (let's say, 10GB)
Alright...I've given the site a fair search and have read over many posts about
Is it alright to expect that the user using the back end will have
I am developing a small windows app, but have some trouble deciding whether to
I am working on understanding recursion, and I think I have it down alright...

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.