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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:11:23+00:00 2026-06-05T19:11:23+00:00

I need to show a UIActionSheet on a popover and this popover has an

  • 0

I need to show a UIActionSheet on a popover and this popover has an arrow pointing to an element on Cocos2D.

I need to calculate this element’s boundingBox rect in terms of the director view coordinates where the UIActionSheet will be shown, so the action sheet arrow will be pointing to it.

How do I do that?

  • 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-05T19:11:24+00:00Added an answer on June 5, 2026 at 7:11 pm

    This is a quick sample I created, Just change the UIPopoverController to your UIActionSheet.

    CCNode* node = (CCNode *)sender;
    CGPoint worldPoint = [node convertToWorldSpace:CGPointZero];
    CGRect rect = [sender boundingBox];
    rect.origin = worldPoint;
    // Convert position based on Apple's anchor point from cocos2d's anchor point
    rect.origin.y = rect.origin.y + rect.size.height;
    CGPoint convertedLocation = [[CCDirector sharedDirector] convertToUI:ccp(rect.origin.x, rect.origin.y)];
    rect.origin = convertedLocation;
    
    UIViewController* viewController= [[UIViewController alloc] init];
    [[viewController view] setBackgroundColor:[UIColor greenColor]];
    UIPopoverController* c = [[UIPopoverController alloc] initWithContentViewController:viewController];
    [c presentPopoverFromRect:rect inView:[[CCDirector sharedDirector] view] permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to show a form exactly in front of another form, this lead
I need show options in a select with unicode characters. Try this: <select id=ddlNota_CateId>
In my application I need show some info popup. This is just a text
i have link like this i need show detail of city in dialog box
I need to present a UIActionSheet that will show 10 buttons. When I do
I need to show some html code in TextBox. this is my TextBox description:
I need to show all numbers from matrix(3x3) where number has two first bits
I've a UIPickerView and need to make it show inside a UIActionSheet in iPad
I has this following code to show a VideoView on top of anything that
We need to show quotes related with the current document. This user story will

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.