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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:41:01+00:00 2026-06-04T03:41:01+00:00

In a universal app, I have a UIView which is presented inside an iPhone-Screen-Sized

  • 0

In a universal app, I have a UIView which is presented inside an iPhone-Screen-Sized popover controller on the iPad, and a Modal View Controller on the iPhone/Touch.

That UIView, if a user taps a particular button, presents a UIActionSheet with 20+ entries. On the iPhone, the action sheet fills the screen, with a scrollable “wheel”-style list of options. However, on the iPad, the behavior is out of whack: The action sheet presents itself as the wheel-style list again, but extremely tall; it expands the popover to the maximum possible height, but the action sheet is still taller than the popover. So what you wind up with is a ridiculously tall popover with a wheel-style list that’s partially cut off at the top, with no way to reach the items at the top of the list. See the images below.

Anyway: I’d ideally like precisely the same thing you see in the iPhone to show up inside that popover, without changing the size of the popover. Is that doable?

Images:
iPhone version after presenting action sheet:

iPhone version after presenting action sheet

iPad version showing original UIview with button to press:

iPad version showing original UIview with button to press

iPad version after pressing button, showing actionsheet:

iPad version after pressing button, showing actionsheet

  • 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-04T03:41:02+00:00Added an answer on June 4, 2026 at 3:41 am

    EDIT: I’ve put together a more complete solution here https://github.com/brandonschlenker/BSActionSheet

    This is a bit of a pain and honestly, I’m not sure if it’s worth the effort. If Apple ever changes UIActionSheet all of this will likely break. Anyway, here’s what could be a solution…

    You’re going to need to subclass UIActionSheet and resize all of it’s subviews and superviews according.

    In layout subviews, we’re going to iterate through the views and begin resizing the elements to fit our needs. I started by just logging out the list of subviews to find which element was which. So far, I’ve found the table view, the table views frame that rounds the corners, the popover, etc. You’ll still need to go through and find the cancel button and move that around as well.

    - (void)layoutSubviews
    {
        CGRect tableViewFrame = CGRectZero;
        for (id item in [self subviews])
        {
            if ([item isKindOfClass:[UIView class]])
            {
                UIView *v = (UIView *)item;
                v.frame = CGRectMake(v.frame.origin.x, v.frame.origin.y, self.frame.size.width, 320);
    
                for (UIView *subItem in [v subviews])
                {
                    //table view of options
                   if ([subItem isKindOfClass:[UITableView class]])
                   {
                       subItem.frame = CGRectMake(subItem.frame.origin.x, subItem.frame.origin.y, subItem.frame.size.width, someNewHeightHere);
                       tableViewFrame = subItem.frame;
                   }
    
                    //table view image frame. this rounds the bottom corners
                    if ([subItem isKindOfClass:[UIView class]] && subItem.tag == 3334)
                    {
                        subItem.frame = CGRectMake(subItem.frame.origin.x, tableViewFrame.origin.y, subItem.frame.size.width, someNewHeightHere);
                    }
    
                    //this is the cancel buttons label. never could get this to do anything
                    if ([subItem isKindOfClass:NSClassFromString(@"UIButtonLabel")])
                    {
                            if (subItem.frame.size.width == 66)
                            {
    
                            }
                    }
                }
            }
        }
    
        UIViewController *v = [self viewController];
        v.contentSizeForViewInPopover = CGSizeMake(self.frame.size.width, someNewHeightHere);    
    }
    

    I also have a convenience method to grab the views parent view controller.

      - (UIViewController *)viewController 
        {
            UIResponder *responder = self;
            while (![responder isKindOfClass:[UIViewController class]]) {
                responder = [responder nextResponder];
                if (nil == responder) {
                    break;
                }
            }
            return (UIViewController *)responder;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Universal app (iPhone/iPad) which has an iAd displayed at the bottom
I have a Universal app (iPhone/iPad) which is very basic. There is a List
I have a Universal app (iPhone/iPad) testing on IOS4.3. It has an iAd which
I have a universal view controller class which all of the view controller classes
I have a universal app and for each device (iPad, iPhone) have different sets
Im converting an Iphone app to a universal App, I have created an Ipad
I have a Universal App in which I customize my UINavigationBar. In my iPhone
I have an iPhone app which requires to be a universal app. Common between
If I have a universal app (runs on both iPhone & iPad), how do
in my universal app, I have a UIControl View inside of a UIScrollView. On

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.