• 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
Quickly Moving Views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Quickly Moving Views


  • Subject: Quickly Moving Views
  • From: johness does <email@hidden>
  • Date: Wed, 16 Jul 2003 13:31:37 -0700 (PDT)

I would like to quickly move two views around. Now
there is a catch, both these views are nsclipviews
contained withing a scroll view. All i want to do is
shit the BOTH to the left and right, as quickly as
possible, like this:

first:
+------------+
| +--+-----+ |
| | | | |
| |1 | 2 | |
| +--+-----+ |
+------------+

The surrounding view is the container scrollview. 1
is a clip view at (0.0,0.0) and 2 is one at
(0.0,40.0).

What I want to happen is to move 1 to (-24.0,0.0)
(thus not visible) and 2 to (0.0,0.0), making it
appear as the only one.

second:

+------------+
| +--------+ |
| | | |
| | 2 | |
| +--------+ |
+------------+

(1 is hidden)

I was able to do this using an NSTimer and it looks
pretty smooth too. Except when 2 (which is a clipview
for a NSTextView) contains a lot of text. Now, what I
did was hack it to act as if its in live resize, but
its still a little sluggish.

What I would like to do is take advantage of
NSClipView's caching or whatever ability to only
redraw newly exposed portions. Currently it redraws
the entire textview every run through the NSTimer as
it moves left. When it scrolls it only redraws newly
exposed regions, so the same should be possible when
moving it to the right, right?

Anyboy have any insight on how to do this?

Any help is greatly appreaciated.

Thank you in advance.

Francisco Tolmasky
http://users.adelphia.net/~ftolmasky

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Quickly Moving Views
      • From: John Randolph <email@hidden>
  • Prev by Date: Efficient scrolling problem
  • Next by Date: Re: Quickly Moving Views
  • Previous by thread: Efficient scrolling problem
  • Next by thread: Re: Quickly Moving Views
  • Index(es):
    • Date
    • Thread