/TextScroller

A text scroller View (scrolls left or right horizontally)

Primary LanguageObjective-C

##TextScroller

Description

A text scroller View (scrolls left or right horizontally) . This is a UIView that holds a UILabel in it. The text of the UILabel is scrolled. Three types of scrolling types are available at the moment.

  1. Right to Left
  2. Left to Right
  3. Floating

ScreenShot

This git package contains an example Xcode project. Executing which you would get a screen shot like below.

ScreenShot

###Usage

Files

Just copy the following files and put them inside your project.

  1. SPTextScrollerView.h
  2. SPTextScrollerView.m

Frameworks

Add QuartzCore.Framework into your project

Start

  1. Initiate

Init with UILabel

			- (id)initWithUILabel:(UILabel *)label;

Init With your frame and text

	- (id)initWithFrame:(CGRect)frame Text:(NSString*)text Font:(UIFont*)font ScrollType:(ScrollerType)scrollType;
  1. Configurable Parameters

     CGFloat speed;						// Scrolls pixels per unit time, 5.0 by default
     UIColor *textColor;					// gray by default
     UIFont  *textFont;
     NSString *text;
     ScrollerType textScrollerType;			
    
  2. Helper Methods

     	- (void) startScrolling;		// Start Scrolling
     	- (void) stopScrolling;			// Pause Scrolling
    
  3. Scroller types

     	typedef enum 
     	{
     	ScrollerTypeRightToLeft		= 0,
     	ScrollerTypeLeftToRight		= 1,
     	ScrollerTypeFloating		= 2,
     	ScrollerTypeUnknown			= -1
     	}ScrollerType;
    

More

Follow me @freesuraj on Twitter for the latest news.