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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:49:33+00:00 2026-06-08T11:49:33+00:00

I create programmatically one scrollView and some buttons inside there. When I click the

  • 0

I create programmatically one scrollView and some buttons inside there. When I click the any button have to show a popover.

My button’s origin in self.view is like (100,11) and inside scrollView (9,11) and scrowView is in somewhere in self.view. The popover shows in (9,11) but right one would be (100,11). I try use convert without success.

-(IBAction)showPopover:(id)sender{
//... implemented popover above

//Wrong Origin:
NSLog(@"wrong x:%f y:%f",[sender frame].origin.x, [sender frame].origin.y);

//Transform to correct
CGRect frame = [self.view convertRect:[sender frame] toView:nil];

//Shoulf be right, but is not...
NSLog(@"new x:%f y:%f",frame.origin.x, frame.origin.y);
}

Anyone cam help me?

  • 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-08T11:49:34+00:00Added an answer on June 8, 2026 at 11:49 am

    A view’s frame is already in the superview’s coordinate system. So if your setup is self.view contains scrollview contains sender:

    CGRect frame = [sender.superview convertRect:sender.frame toView:self.view];
    
    // or, better:
    
    CGRect frame = [sender convertRect:sender.bounds toView:self.view];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could some one guide me to create a APS logon token in .Net programmatically?
I have one Bitmap image. How do I create a bigger bitmap programmatically? I
I have to create a button programmatically, and set an image background at that
I'm trying to programmatically create some javascript buttons to toggle visibility on the page
Hi I create button programmatically and I connect my button to another view, but
I want to programmatically create a directory on the server using ASP.NET. I have
How does one programmatically create a UNC share from a known directory? How does
I have a div container inside which there are several child divs with css
How can one programmatically determine logins/users that have permission to access specific SSRS reports?
I want to create 2 UITableView programmatically in a UIViewController. I have 2 NSMutableArray

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.