Skip to content

UrbanHooker/RYMarqueeLabel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RYMarqueeLabel

License MIT  CocoaPods  CocoaPods  Support 

A UILabel with marquee effect

label

#Installing ##CocoaPods

  1. Add pod 'RYMarqueeLabel' to your Podfile.
  2. Run pod install or pod update.
  3. Import "RYMarqueeLabel.h".

##Manually

  1. Drag the RYMarqueeLabel folder to your project.
  2. Import "RYMarqueeLabel.h".

#Usage

If you want to know more details, please reference to the demo :]

#import "RYMarqueeLabel.h"

@property (nonatomic, strong) RYMarqueeLabel *label;

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view addSubview:self.label];
    [self.label startAnimation];//< dont't forget call this func
}

- (RYMarqueeLabel *)label {
    if(_label) return _label;
    
    _label = [[RYMarqueeLabel alloc] initWithFrame:(CGRect){.size = {100, 50}}];
    
    // if you just want to set a single text
    _label.text = @"Some words";
    _label.textColor = [UIColor grayColor];
    _label.font = [UIFont systemFontOfSize:17.f];
    ...
    
    // if you have a text array and want to loop it or not
    _label.texts = @[@"Hi", @"How are u", @"I'm fine"];
    _label.enabelLoop = YES;
    
    // if you want to modify the animation durition
    _label.displaiedDuration  = 2.f;
    _label.animationDuration = 5.f;
    
	 // if you want to change the default animation effect
	 _label.effect = kBottomToTop;
    
    return _label;
}

#ChangeLog ##Version: 1.0.1 Fix a bug ##Version: 1.0.0 Initial Build #License MIT License

About

A UILabel with marquee effect, you can change text with animation

Resources

License

Stars

Watchers

Forks

Packages

No packages published