visibleRect returns bogus results, why?
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