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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:23:39+00:00 2026-05-26T01:23:39+00:00

Hi here i developing small application. In a subclass screen i have two buttons.

  • 0

Hi here i developing small application. In a subclass screen i have two buttons. When i press the first button, it will shows four actionsheet. When i press second button it wil shows five actionsheet. I was successfully shows it. But i cant set second button actions of five actionsheet. In my code the when i press second button of first actionsheet, it wil actioned first button of first actionsheet. Here i want set actions for individual actionsheets. Pls help me. Here is my code is

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if ( indexPath.row == 0)
{
    UIActionSheet *popupQuery = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Edit" otherButtonTitles:@"Remove", @"Sell",@"Scrap", nil];
    popupQuery.actionSheetStyle = UIActionSheetStyleBlackTranslucent;
    [popupQuery showInView:self.view];
    [popupQuery release];
}
if ( indexPath.row == 1 ) 
{
    UIActionSheet *popupQuery = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Unsell" otherButtonTitles:@"Edit Item", @"Edit Sale",@"Sold",@"Scrap", nil];
    popupQuery.tag=5;
    popupQuery.actionSheetStyle = UIActionSheetStyleBlackOpaque;
    [popupQuery showInView:self.view];
    [popupQuery release];
}
}

-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 0) 
{
    Updateasset *object=[[Updateasset alloc]initWithNibName:@"Updateasset" bundle:nil];
    [self presentModalViewController:object animated:NO];
    [object release];
} 
else if (buttonIndex == 1)
{
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Remove" message:@"Do you want to Remove"
                                                   delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
    [alert show];
    [alert release];
} 
else if (buttonIndex == 2)
{
    Egarageselling *object=[[Egarageselling alloc]initWithNibName:@"Egarageselling" bundle:nil];
    [self presentModalViewController:object animated:YES];
    [object release];
} 
else if (buttonIndex == 3) 
{
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Scrap" message:@"Do you want to Scrap"
                                                   delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
    [alert show];
    [alert release];
}
else if (buttonIndex == 4) 
{

}
else if (buttonIndex == 5) 
{

}
else if (buttonIndex == 6) 
{
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Scrap" message:@"Do you want to Scrap"
                                                   delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
    [alert show];
    [alert release];
}
else if (buttonIndex == 7) 
{
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Scrap" message:@"Do you want to Scrap"
                                                   delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
    [alert show];
    [alert release];
}
else if (buttonIndex == 8) 
{
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Scrap" message:@"Do you want to Scrap"
                                                   delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
    [alert show];
    [alert release];
}
else if (buttonIndex == 9) 
{
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Scrap" message:@"Do you want to Scrap"
                                                   delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
    [alert show];
    [alert release];
}
}

How to solve this problem.

  • 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-26T01:23:40+00:00Added an answer on May 26, 2026 at 1:23 am

    Set different tags for two actionsheets like
    popupQuery.tag=5;
    popupQuery.tag=6;

    -(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex 
    {
        if(actionSheet.tag==5)
        {
           if (buttonIndex == 0) 
           {
           }
          so on
        }
        if(actionSheet.tag==6)
        {
           if (buttonIndex == 0) 
           {
           }
           so on
        }
    
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to objective-c and at the moment developing a small application. I have
I am developing a small application in android in which i have few image
I am developing small application for training purposes. There after click on the button
I am developing a small desktop application in Netbeans. on my UI i have
Well, I think I have a very basic doubt here: I'm developing an app
Here's the situation: I'm developing a simple application with the following structure: FormMain (startup
first question here. I'm developing a program in C# (.NET 3.5) that displays files
I'm developing an Eclipse plug-in and I have a problem which is reproduced here:
Like most developers here and in the entire world, I have been developing software
I am developing a small Ruby-on-rails application. I am using 'roo' gem to open

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.