Saturday, October 31, 2009

More details on AutoScrollLabel usage

Here are some screenshots demonstrating how to integrate the AutoScrollLabel class into an iPhone XCode project using Interface Builder.

1) Add the AutoScrollLabel class files to your project and add an outlet for the scrolling text. Save the files. Otherwise the next steps won't work.

2) Add a UIScrollView to your view using Interface Builder. Then, using the Inspector, change the class type to AutoScrollLabel.

3) Right click on the scrolling label and assign a referencing outlet to be the outlet you added in step 1.

4) Add code to your view controller class to set the text and other properties for the autoScrollLabel.

5) Compile your project and the autoScrollLabel should now be scrolling like a marquee.

And in case that's not clear, here's a (silent) video demonstrating the same thing. (You might want to bump the video to fullscreen so the text is readable.) Enjoy!

AutoScrollLabel Demo from Brian Stormont on Vimeo.

All content copyright © 2009  Brian Stormont, unless otherwise noted.   All rights reserved.