Giter VIP home page Giter VIP logo

txscrolllabelview's Introduction

TXScrollLabelView(中文版

AppVeyor  Pod Platform  Support  Pod License

TXScrollLabelView is an iOS class that displays a adverts or boardcast e.g. with an view.

TXScrollLableView Gif

Support what kinds of scrollType

  • TXScrollLabelViewTypeLeftRight : scrolling from right to left, and cycle all contents(scrollTitle) in a single line.

  • TXScrollLabelViewTypeUpDown: scrolling from bottom to top, and cycle all contents.

  • TXScrollLabelViewTypeFlipRepeat: scrolling from bottom to top, and cycle the first line of your contents.

  • TXScrollLabelViewTypeFlipNoRepeat: scrolling from bottom to top, and cycle all contents with a line once times.

And scrollVelocity property now supports all above enum of TXScrollLabelViewType, just enjoy it!

Installation

There are two ways to use TXScrollLabelView in your project:

  • Using CocoaPods

  • By cloning the project into your repository

  • Using Carthage (not support now)

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries in your projects.

Podfile

platform :ios, '7.0'
pod 'TXScrollLabelView'

Installation with Manual

  • Drag ALL files in the TXScrollLabelView folder to project

  • Import the main file:

      #import "TXScrollLabelView.h”
    

Usage

Objective-C example :

    NSString *scrollTitle = @"xxxxxx";
    //options 是 TXScrollLabelViewType 枚举类型, 此处仅为了方便举例
    TXScrollLabelView *scrollLabelView = [TXScrollLabelView scrollWithTitle:scrollTitle type:options velocity:3 options:UIViewAnimationOptionTransitionFlipFromTop];
    [self.view addSubview:scrollLabelView];
    
    //布局(Required)
    scrollLabelView.frame = CGRectMake(50, 100 * (options + 0.7), 300, 30);
    
    //偏好(Optional)
    scrollLabelView.tx_centerX  = [UIScreen mainScreen].bounds.size.width * 0.5;
    scrollLabelView.scrollInset = UIEdgeInsetsMake(0, 10 , 0, 10);
    scrollLabelView.scrollSpace = 10;
    scrollLabelView.font = [UIFont systemFontOfSize:15];
    scrollLabelView.textAlignment = NSTextAlignmentCenter;
    scrollLabelView.backgroundColor = [UIColor blackColor];
    scrollLabelView.layer.cornerRadius = 5;
    
    //开始滚动
    [scrollLabelView beginScrolling];
    self.scrollLabelView = scrollLabelView;

You can running TXScrollLabelViewDemo for more details.

Swift example : Producting.

License

TXScrollLabelView is available under the MIT license. See the LICENSE file for more info.

txscrolllabelview's People

Contributors

tingxins avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.