View Full Version : marquee
chhoda
May 28, 2009, 09:21 AM
i am required to do a marquee type scrolling of a label when the text is more than my scren width. any ideas ?
--CH
Haruhi
May 28, 2009, 02:56 PM
think so
detz
May 28, 2009, 05:01 PM
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.
Haruhi
Oct 26, 2009, 09:00 AM
<marquee>YO<marquee>
That kind of thing, right?
xStep
Oct 26, 2009, 03:55 PM
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.
dejo
Oct 26, 2009, 04:04 PM
Use a UIScrollView and programmatically (in a loop or via a timer) set your contentOffset.
PhoneyDeveloper
Oct 27, 2009, 12:01 AM
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.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.