Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/freesuraj/textscroller
A text scroller View (scrolls left or right horizontally)
https://github.com/freesuraj/textscroller
Last synced: about 1 month ago
JSON representation
A text scroller View (scrolls left or right horizontally)
- Host: GitHub
- URL: https://github.com/freesuraj/textscroller
- Owner: freesuraj
- Created: 2012-06-10T14:07:31.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-12-19T04:20:31.000Z (about 12 years ago)
- Last Synced: 2024-11-19T07:09:00.577Z (3 months ago)
- Language: Objective-C
- Size: 273 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
##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.

###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;
2. Configurable ParametersCGFloat speed; // Scrolls pixels per unit time, 5.0 by default
UIColor *textColor; // gray by default
UIFont *textFont;
NSString *text;
ScrollerType textScrollerType;3. Helper Methods
- (void) startScrolling; // Start Scrolling
- (void) stopScrolling; // Pause Scrolling
4. Scroller types
typedef enum
{
ScrollerTypeRightToLeft = 0,
ScrollerTypeLeftToRight = 1,
ScrollerTypeFloating = 2,
ScrollerTypeUnknown = -1
}ScrollerType;
### More
Follow me [@freesuraj](http://twitter.com/freesuraj) on Twitter for the latest news.