美文网首页界面
iOS-上下滚动的跑马灯(很容易自定义)

iOS-上下滚动的跑马灯(很容易自定义)

作者: Simple_Code | 来源:发表于2018-03-06 18:10 被阅读23次
    Marquee.gif

    调用方法

    SPMarqueeView *marqueeView = [[SPMarqueeView alloc]initWithFrame:CGRectMake(0, 0, 200, 40)];
        [self.view addSubview:marqueeView];
        marqueeView.backgroundColor = [UIColor yellowColor];
        marqueeView.center = CGPointMake([UIScreen mainScreen].bounds.size.width/2.f, [UIScreen mainScreen].bounds.size.height/2.f);
        marqueeView.marqueeTitleArray = @[@"新闻",
                                          @"游戏",
                                          @"娱乐"];
        marqueeView.marqueeContentArray = @[@"我在测试第一组数据",
                                            @"我在测试第二组数据",
                                            @"我在测试第三组数据"];
        [marqueeView start];
        marqueeView.block = ^(NSInteger index) {
            NSLog(@"点击了第%ld组数据",index);
        };
    

    思想:

    源码下载

    相关文章

      网友评论

        本文标题:iOS-上下滚动的跑马灯(很容易自定义)

        本文链接:https://www.haomeiwen.com/subject/usyrfftx.html