• 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
Solved: visibleRect returns bogus results, why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Solved: visibleRect returns bogus results, why?


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

Never mind, what works reliably is:

    NSRect theRect = [[[self view] enclosingScrollView] visibleRect];


Am 11.06.2011 um 14:39 schrieb Alexander Reichstadt:

> 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:
    • Re: Solved: visibleRect returns bogus results, why?
      • From: Alexander Reichstadt <email@hidden>
References: 
 >visibleRect returns bogus results, why? (From: Alexander Reichstadt <email@hidden>)

  • Prev by Date: visibleRect returns bogus results, why?
  • Next by Date: Re: Solved: visibleRect returns bogus results, why?
  • Previous by thread: visibleRect returns bogus results, why?
  • Next by thread: Re: Solved: visibleRect returns bogus results, why?
  • Index(es):
    • Date
    • Thread