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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:47:30+00:00 2026-05-24T01:47:30+00:00

I have this code to get NSStrings from an NSDictionary from an NSMutableArray but

  • 0

I have this code to get NSStrings from an NSDictionary from an NSMutableArray but the problem is that it does not show right.
Here is the code:

UIActionSheet *playingSheet = [[UIActionSheet alloc] initWithTitle:@"Hi" delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil];
     for(NSDictionary *dict in accounts) {
         NSString *name = [dict objectForKey:@"Name"];
         [playingSheet addButtonWithTitle:name];
     }
     [playingSheet showInView:self.view];
     [playingSheet release];

The problem is in my case, self.view is a subview of a parentView and is loaded from an XIB and is not full screen. So the problem is my action sheet is like half the width of the iPhone’s screen and it is not even touching the bottom of the screen.
In my case, how would I fix it so its the top most view (so users can see it properly), and the way a regular actionSheet is supposed to look?

Thanks!

Edit: This was the fix:

[playingSheet showInView:[UIApplication sharedApplication].keyWindow];
  • 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-24T01:47:30+00:00Added an answer on May 24, 2026 at 1:47 am

    You need to set the frame of the action sheet as

    [playingSheet setFrame:CGRectMake(0, theHeightYouWant, 320, yourDesiredHeight)];
    

    “theHeightYouWant” is the height by which you must shift the action-sheet upwards/downwards to put it in the right position on the screen. You can change this by trial and error. For example, if your self.view is in the lower half of the screen, “theHeightYouWant” will be negative!

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

Sidebar

Related Questions

I have this code right now to get the row value from jquery grid..
i have this code to get the search resutls from the api: querygoogle.php: <?php
Hey I have this code right here: http://pastie.org/534470 And on line 109 I get
Ok, if I have this right, my code can get cookies at a specific
I have this piece of code I'm trying to get to display but no
I have written some code that pulls info from a plist file and does
why does this code not work for referencing a const from a class? Background:
I have an init method that takes values from a NSDictionary . This is
I have this code to connect to Active Directory and get all the groups
I have this code working in C#: var request = (HttpWebRequest)WebRequest.Create(https://x.com/service); request.Method = GET;

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.