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

  • Home
  • SEARCH
  • 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 503309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:22:51+00:00 2026-05-13T06:22:51+00:00

I have been trying this one tonight for a while…. I have a UIActionSheet

  • 0

I have been trying this one tonight for a while…. I have a UIActionSheet in its own controller. I import the controller in the view I would like it to be displayed. I can’t figure out how to make a new view be shown when the user presses one of the buttons (you can see where I just send an alert right now). Any ideas?

- (void)helpButtonPressedView {
    // open a dialog with two custom buttons
    UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@""
                                                    delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil
                                                    otherButtonTitles:@"Help", @"Credits", nil];
    [self parentViewController];
    actionSheet.actionSheetStyle = UIActionSheetStyleDefault;
    [actionSheet showInView:self.view]; // show from our table view (pops up in the middle of the table)
    [actionSheet release];
}

- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
    NSLog(@"Button Pressed: %d",buttonIndex);

    int btn = buttonIndex;

    UIAlertView *alert;

    switch (btn) {
        case 0:
            // help screen
            alert = [[UIAlertView alloc] initWithTitle:@"Button Press Notice" message:@"The Help screen will be dispayed"
                                                           delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
            [alert show];   
            [alert release];

//          helpViewController = [[HelpViewController alloc] init]; 
//          [self presentModalViewController:helpViewController animated:YES];

            break;
        case 1:
            // credits screen
            alert = [[UIAlertView alloc] initWithTitle:@"Button Press Notice" message:@"The Credits screen will be dispayed"
                                              delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
            [alert show];   
            [alert release];            
            break;
        default:
            break;
    }

}

Here is a pic of what I am trying to do… When the user presses on the “Help” button, a new view shows. When the user presses the “Credits” button a different view shows. I am using IB to create the views.

alt text http://thecoolestcompany.com/UIActionSheet-view.jpg

  • 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-13T06:22:52+00:00Added an answer on May 13, 2026 at 6:22 am

    It has been a while since I asked this question — and I figured it out a while ago…. I was missing the navigation controller to do a push of a view controller. In other words, create the view controller then push the view using a navigation controller. If anyone is reading this and needs sample code, post against the question and I will post the sample code…

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

Sidebar

Related Questions

No related questions found

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.