• 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
Re: Generating Scrolling Text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Generating Scrolling Text


  • Subject: Re: Generating Scrolling Text
  • From: Philip Dow <email@hidden>
  • Date: Tue, 20 Dec 2005 23:04:29 +0100

I was aware of the cocoa dev article, but as far as I understand it, when the text scrolling restarts, the entire scroll area of text would reappear and continue scrolling, whereas with the iTunes about box, only one line appears at the bottom at restart. I suppose you could get around this by padding the text with newlines at the beginning. I had been planning to pad my offscreen image with whitespace at the top and bottom so I wouldn't need to worry about resizing the source rect, only moving it. But then, with the text view, I would not be able to gently fade the attributed string in and out if I were to implement something like that in the future.

-Phil

On Dec 20, 2005, at 10:57 PM, Eamon Ford wrote:

http://cocoadevcentral.com/articles/000044.php

Does that help at all?


On Dec 20, 2005, at 1:52 PM, Philip Dow wrote:

I'm looking to generate some scrolling text in a view. No scroll bars are involved. Rather, I'd like to begin the text at the bottom of the view and scroll it upwards, eventually fading it out at the top and restarting when finished. Basically what you see in the iTunes about box.

What's the best way to do this? I'm thinking of using a custom nsview. I would render my attributed string into an instance variable nsimage either at init or some other point prior to drawing. A timer would fire calling a method to change the dimensions of a rect which I would then use as the source rect for compositing the image in the view's drawInRect method. The sounds pretty good to me, but I don't know if it's the best or most efficient way. Is there a better?

Plus, just to be sure, I should be able to draw my attributed string into the image as long as I lock focus on it, right?

-Phil
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: Generating Scrolling Text
      • From: Gideon King <email@hidden>
References: 
 >Generating Scrolling Text (From: Philip Dow <email@hidden>)
 >Re: Generating Scrolling Text (From: Eamon Ford <email@hidden>)

  • Prev by Date: Re: Generating Scrolling Text
  • Next by Date: NSManagedObjectID best practices?
  • Previous by thread: Re: Generating Scrolling Text
  • Next by thread: Re: Generating Scrolling Text
  • Index(es):
    • Date
    • Thread