• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
visibleRect returns bogus results, why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

visibleRect returns bogus results, why?


  • Subject: visibleRect returns bogus results, why?
  • From: Alexander Reichstadt <email@hidden>
  • Date: Sat, 11 Jun 2011 14:39:52 +0200

Hi,


I have a view with view controller. The controller receives scroll changes. visibleRect returns bogus, so I tracked it with NSLog and confirmed this.

I use this code:
 NSRect theRect = [[self view] visibleRect];
 NSLog(@"%@",NSStringFromRect(theRect));

When I scroll using the scrollwheel or arrows of the scrollbar, it looks good

2011-06-11 14:34:06.089 App[20913:903] {{0, 0}, {10, 344}

When I click onto the dot inside the scrollbar and drag it to another position, it turns to bogus:
2011-06-11 14:34:09.108 App[20913:903] {{0, 1.21354e+09}, {10, 344}}

I also tried:
 NSRect theRect = [[[self view] enclosingScrollView] documentVisibleRect];

Same result. Why????



Thanks
Alex
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Solved: visibleRect returns bogus results, why?
      • From: Alexander Reichstadt <email@hidden>
  • Prev by Date: Re: NSInputStream created from NSData - expected it to close at end of data, did not happen
  • Next by Date: Solved: visibleRect returns bogus results, why?
  • Previous by thread: Re: NS_BUILD_32_LIKE_64
  • Next by thread: Solved: visibleRect returns bogus results, why?
  • Index(es):
    • Date
    • Thread