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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:11:57+00:00 2026-06-06T23:11:57+00:00

Hi guys i have an issue i cannot get my head around. I have

  • 0

Hi guys i have an issue i cannot get my head around.

I have broken down this issue into its own project and i can still reproduce it.

I have a scrollview say with a 30 uibutton layed out. (for example)

If i was to enumerate over the the subview and log the frames, the odd one will have a frame that wasnt expected

This occurs even once the view has been drawn on the screen

e.g

ViewDidLoad

 [self.scrollVIew.subviews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {

        UIButton* view = (UIButton*)obj;

        NSLog(@"%@",NSStringFromCGRect(view.frame));



    }];

LOG:

2012-07-04 15:46:02.939 BUG SCROLLER[2182:707] {{29, 647}, {72, 37}}

2012-07-04 15:46:02.946 BUG SCROLLER[2182:707] {{119, 647}, {72, 37}}

2012-07-04 15:46:02.950 BUG SCROLLER[2182:707] {{219, 647}, {72, 37}}

2012-07-04 15:46:02.954 BUG SCROLLER[2182:707] {{313, 453}, {7, 7}}

As you can see the bottom log shows completly incorrect frame origins and size.

Oddly what ever the size of the view i always seem to get a size of 7.

This appear reproducable but is not visible on the screen

What is going on here and how can i avoid it from happening?

Thanks Dan

  • 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-06T23:11:59+00:00Added an answer on June 6, 2026 at 11:11 pm

    Try this instead :

    [self.scrollVIew.subviews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
    if([obj isKindOfClass:[UIButton class]])
    {
            UIButton *currentButton = (UIButton *)obj;
            NSLog(@"%@",NSStringFromCGRect(currentButton.frame));
    }
    }];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi guys I am having issue I have this query: SELECT * FROM useraccount
Hi guys I have a strange issue. I am trying to get list of
Hey guys I have a little issue here. I have a panel where I
i have looked at the issue closely since you guys were so confident and
Thus far you guys have been wildly helpful with me getting this little ditty
guys i have arrays in which i have to match this kind of text
Hey guys another rails issue, Currently have a collection that is line items for
Hi guys I have an issue to display chinese character in simple php file,
Hi guys have an issue with the timer basically i have the seconds variable
Hi guys i have an issue currently when using a Socket to send data.

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.