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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:31:53+00:00 2026-06-03T16:31:53+00:00

On the iPhone I like how action sheets take up the entire width of

  • 0

On the iPhone I like how action sheets take up the entire width of the screen and you can choose the height of it (so I can include other views). Here is my entire method that creates the action view (you probably on need the las few lines though)…

-(void)createActionView {
    UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:nil 
                                                             delegate:self
                                                    cancelButtonTitle:nil
                                               destructiveButtonTitle:nil
                                                    otherButtonTitles:@"Done",nil];

    [actionSheet setActionSheetStyle:UIActionSheetStyleBlackTranslucent];

    UIButton *downHoleScore = [UIButton buttonWithType:UIButtonTypeCustom];
    downHoleScore.frame = CGRectMake(93, 75, 35, 35);
    [downHoleScore setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    downHoleScore.backgroundColor = [UIColor clearColor];
    downHoleScore.tag=1;
    [downHoleScore addTarget:self action:@selector(HoleScoreButtonTap:) forControlEvents:UIControlEventTouchUpInside];
    [downHoleScore setBackgroundImage:[UIImage imageNamed:@"Left-Down-Arrow.png"] forState:UIControlStateNormal];
    [actionSheet addSubview:downHoleScore];

    UIButton *upHoleScore = [UIButton buttonWithType:UIButtonTypeCustom];
    upHoleScore.frame = CGRectMake(193, 76, 35, 35);
    [upHoleScore setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    upHoleScore.backgroundColor = [UIColor clearColor];
    upHoleScore.tag=2;
    [upHoleScore addTarget:self action:@selector(HoleScoreButtonTap:) forControlEvents:UIControlEventTouchUpInside];
    [upHoleScore setBackgroundImage:[UIImage imageNamed:@"Right-Up-Arrow.png"] forState:UIControlStateNormal];
    [actionSheet addSubview:upHoleScore];

    golferScoreLabel = [[UILabel alloc] initWithFrame:CGRectMake(140, 70, 45, 45)];
    golferScoreLabel.text = @"0";
    golferScoreLabel.backgroundColor = [UIColor clearColor];
    golferScoreLabel.font = [UIFont fontWithName:@"ChalkDuster" size: 45.0];
    golferScoreLabel.textAlignment = UITextAlignmentCenter;
    golferScoreLabel.shadowColor = [UIColor grayColor];
    golferScoreLabel.shadowOffset = CGSizeMake(1,1);
    golferScoreLabel.textColor = [UIColor whiteColor];
    [actionSheet addSubview:golferScoreLabel];

    CGRect pickerFrame = CGRectMake(0, 120, 0, 0);

    UIPickerView *pickerView = [[UIPickerView alloc] initWithFrame:pickerFrame];
    pickerView.showsSelectionIndicator = YES;
    pickerView.dataSource = self;
    pickerView.delegate = self;

    [actionSheet addSubview:pickerView];

    [actionSheet showInView:[[UIApplication sharedApplication] keyWindow]];

    [actionSheet showFromRect:CGRectMake(0, 0, 320, 585) inView:self.view animated:YES];
}

How would I edit this to make it look more like an action view on the iPhone?

In this code…

[actionSheet showFromRect:CGRectMake(0, 0, 320, 585) inView:self.view animated:YES];

That above is where I think I am messing up how would I make this cover the entire bottom half of the screen on the iPad?

  • 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-03T16:31:55+00:00Added an answer on June 3, 2026 at 4:31 pm

    Read the docs on UIActionSheet. On iPad, they are presented in popovers.

    If you want behavior like on the iPhone, I think you’ll have to write your own actionSheet-like view and animations (which is really not that hard, it just takes a little time).

    Anyway, presenting actionSheets on an iPad with the full width wouldn’t be very good design anyway – you probably don’t want buttons that are as wide as the whole screen. I would advise you to rethink your design.

    But maybe you don’t really want actionSheets. Maybe you only want that nice animation, to present some content of your own like that? That’s certainly doable (see above), but then you have asked the wrong question.

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

Sidebar

Related Questions

Can someone provide an example of drawing an iPhone-like turning wheel using Core Graphics
On a touch device like iPhone/iPad/Android it can be difficult to hit a small
Is Android development restrictive in any way like the iPhone , or can you
I like the effect used in many iPhone apps where a semi-transparent help screen
I want to drag and drop UIbutton in my app like iPhone main screen
I would like to know how can I make a Tap & Hold action
I'd like to integrate something like a welcome panel (welcome screen) into our iPhone
I would like to know how to present the Open In... Action Sheet (iPhone)
I am developing an application for both iPhone and iPad. Here, i would like
Is there anyway to close iphone app just like user press the menu key?

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.