Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chhoda

macrumors 6502
Original poster
Oct 25, 2008
285
1
i am required to do a marquee type scrolling of a label when the text is more than my scren width. any ideas ?

--CH
 
You would probably have to use a fixed width font and calculate if it's too large for the screen. Actually, there might be functions that do this...google around.
 
If this is in a tableview, then I think you'll be challenged. As I understand that each time you make a change, you have to redraw the cells all over again.
 
Write your own UIView Subclass. Set up a timer to setNeedsDisplay the view. Have it draw its text in its drawRect based on a position. Move the position to the left on each iteration of the timer. Double the text so it automatically draws the start of the text after the end of the text. Figure out when you need to restart the text from the beginning.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.