Skip to content

Quickly integrate a marquee up and down(This is a marquee that scrolls up and down)

License

Notifications You must be signed in to change notification settings

LSRain/LSMarqueeView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LSMarqueeView

A fast-integrated marquee(跑马灯)

How to use

add the head file to your project

#pragma mark dataSorce
    
    NSMutableArray *tempArr = @[].mutableCopy;
    UILabel *labelOne = [UILabel new];
    labelOne.font = [UIFont systemFontOfSize:14];
    labelOne.text = @"🤩这是第一个广告内容~";
    labelOne.textColor = [UIColor blackColor];
    
    UILabel *labelTwo = [UILabel new];
    labelTwo.font = [UIFont systemFontOfSize:14];
    labelTwo.text = @"😍这是第二个广告内容~~";
    labelTwo.textColor = [UIColor blackColor];
    
    UILabel *labelThree = [UILabel new];
    labelThree.font = [UIFont systemFontOfSize:14];
    labelThree.text = @"😜这是第三个广告内容~~~";
    labelThree.textColor = [UIColor blackColor];
    
    [tempArr addObject:labelOne];
    [tempArr addObject:labelTwo];
    [tempArr addObject:labelThree];
    
#pragma mark Set frame to marqueeView
    
    self.marqueeView = [[LSMarqueeView alloc] initWithFrame:CGRectMake(10, 100, 354, 60) andLableArr:tempArr];
    [self.view addSubview:self.marqueeView];
    
    self.marqueeView.clickBlock = ^(id sender){
        NSLog(@"sender %@", sender);
    };

Turn on or off rotation

- (void)stopMarquee{
    dispatch_source_cancel(self.marqueeView.timer);
}

- (void)startMarquee{
    [self.marqueeView  startCountdown];
}

Example

example

See More

一个尴尬的轮子之跑马灯

About

Quickly integrate a marquee up and down(This is a marquee that scrolls up and down)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published