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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:40:12+00:00 2026-06-15T04:40:12+00:00

I am trying to work out how I can use a UIAlertView to do

  • 0

I am trying to work out how I can use a UIAlertView to do more than one command.

Basically, in my ViewController, there is already an alertView, however I am now adding some storekit files, which, require there own alertView (to tell it whether to purchase the in-app or cancel etc.

Here is original alertView code;

- (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
    [alertView dismissWithClickedButtonIndex:0 animated:NO];
    if (buttonIndex == 1) {
        [g_GameUtils removeAlbumFolder:deleteIndex];
        [g_GameUtils readAllData];
        [g_GameUtils getAlbumFolderList];
        [m_pTable reloadData];
    }
}

And here is what I need also – they are both called alertView so I cannot use both like this, is there a way to combine them? Or is it better to call one of them alertView2 ? If so, how does it know which one to call for the particular alert?

Thanks in advance!

Chris

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
    if (buttonIndex == 0){
        //cancel button clicked. Do something here or nothing here
    }
    else{
        //other button indexes clicked
        [[MKStoreManager sharedManager] buyFeature:@"com.davis.apptoken.buy"];
    }

}
  • 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-15T04:40:13+00:00Added an answer on June 15, 2026 at 4:40 am

    Also you can use alertView.tag = 1; and alertView2.tag = 2; and add appropriate conditions to delegate:

    if (alertView.tag == 1) 
    {
        // First alert 
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to work out if I can use a resource file, while
I am trying to work out why I can not access the nested function
I am trying to work out how I can insert the string End into
I have a generic Collection and am trying to work out how I can
Im trying to work out how to get the value from one setting in
I'm trying to work out the correct pattern to use for a Singleton that
I am trying to work out if I can parallelise the training aspect of
I'm trying to work out if it is possible to use Google Apps Scripts
I'm trying to work out how I can make my CSS as de-coupled from
I'm trying to work out if I can condense a number of regex's into

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.