All Projects → shevakuilin → Skautoscrolllabel

shevakuilin / Skautoscrolllabel

Licence: mit
Automatically scrolling UILabel with both horizontal/vertical MARQUEE effects and gradient gradients on the edges. Gradient fading is used on the edge of the scroll to solve the problem of the hard edges of the rolling edge. The overall effect is a natural and easy to use.

Projects that are alternatives of or similar to Skautoscrolllabel

Marqueelabel
Charles Powell
Stars: ✭ 3,741 (+5745.31%)
Mutual labels:  ios-ui, uilabel, marquee
Swiftcocoadsl
An easy way to write iOS UI
Stars: ✭ 103 (+60.94%)
Mutual labels:  ios-ui, uilabel
Autoscrolllabel
Provides marquee like UILabel scrolling, think Music.app track title scrolling. For Obj-C & Swift.
Stars: ✭ 499 (+679.69%)
Mutual labels:  uilabel, marquee
Katwebx
An extremely fast static web server and reverse proxy for the modern web.
Stars: ✭ 39 (-39.06%)
Mutual labels:  lightweight
Spionio
Lightweight focus group management platform that can capture and replay user interaction on your site and improve the UX in everything you build
Stars: ✭ 40 (-37.5%)
Mutual labels:  lightweight
Localize React
✈️ Lightweight React Localization Library 🇺🇸
Stars: ✭ 52 (-18.75%)
Mutual labels:  lightweight
Infrared
An ultra lightweight minecraft reverse proxy and idle placeholder
Stars: ✭ 59 (-7.81%)
Mutual labels:  lightweight
Nelinelabel
🖋 A UILabel subclass that adds a decorative line / separator
Stars: ✭ 36 (-43.75%)
Mutual labels:  uilabel
Termly.js
Simple, Extensible, Hackable and Lightweight Javascript Browser Terminal Simulator!
Stars: ✭ 56 (-12.5%)
Mutual labels:  lightweight
Gjlightbluetooth
自己封装的基于CoreBluetooth的蓝牙开发库,内附CoreBluetooth使用demo。数据传递基本上使用Block,还使用了Runtime等技术。
Stars: ✭ 50 (-21.87%)
Mutual labels:  lightweight
Amp Spectre
⚡ AMP Spectre CSS Framework
Stars: ✭ 49 (-23.44%)
Mutual labels:  lightweight
Yox
A lightweight mvvm framework
Stars: ✭ 1,027 (+1504.69%)
Mutual labels:  lightweight
Simiki
Simiki is a simple wiki framework, written in Python.
Stars: ✭ 1,082 (+1590.63%)
Mutual labels:  lightweight
Get Browser
💻 Lightweight tool to identify the browser (mobile+desktop detection)📱
Stars: ✭ 40 (-37.5%)
Mutual labels:  lightweight
Qtwebserver
Qt based web application server
Stars: ✭ 56 (-12.5%)
Mutual labels:  lightweight
Dom99
Extend html with directives
Stars: ✭ 37 (-42.19%)
Mutual labels:  lightweight
Floatsidebar.js
Lightweight (2kb gzipped), zero-dependency javascript library for making float sidebars based on the finite state machine
Stars: ✭ 56 (-12.5%)
Mutual labels:  lightweight
Legacycss
Legacy CSS - Modern and Lightweight CSS Framework
Stars: ✭ 48 (-25%)
Mutual labels:  lightweight
Uploader
A lightweight and very configurable jQuery plugin for file uploading using ajax(a sync); includes support for queues, progress tracking and drag and drop.
Stars: ✭ 1,042 (+1528.13%)
Mutual labels:  lightweight
Lity
Lightweight, accessible and responsive lightbox.
Stars: ✭ 1,051 (+1542.19%)
Mutual labels:  lightweight

SKAutoScrollLabel

Automatically scrolling UILabel with both horizontal/vertical MARQUEE effects and gradient gradients on the edges.Gradient fading is used on the edge of the scroll to solve the problem of the hard edges of the rolling edge. The overall effect is a natural and easy to use.

Feature

  • Supports automatic scrolling in four directions: up, down, left, and right.
  • Freely controllable scroll pause/continue.
  • Scrolling behavior is not interrupted when applying background switching.
  • Lightweight, at least one line of initialization code is required to create.
  • Control gradient effect is softer and more natural.
  • Fully comment and instructions.

Using effect

How to use

Step 1: Execute git clone [email protected]:shevakuilin/SKAutoScrollLabel.git,then view Example.

Step 2: Copy the SKAutoScrollLabel from the directory directly into your project, or add pod 'SKAutoScrollLabel' to the Podfile.

Step 3: Reference header file #import <SKAutoScrollLabel/SKAutoScrollLabel.h>

Installation

Created by code

// Scroll from right to left
SKAutoScrollLabel *scrollLabel = [[SKAutoScrollLabel alloc] initWithTextContent:@"Fly me to the moon.Let me play among the stars.Let me see what spring is like on Jupiter and Mars.In other words, hold my hand.In other words, baby, kiss me." direction: SK_AUTOSCROLL_DIRECTION_LEFT];
scrollLabel.backgroundColor = [UIColor orangeColor];
scrollLabel.textColor = [UIColor whiteColor];
// ... other settings

Created by storyboard

// Set the object's class to SKAutoScrollLabel in the storyboard
@property (weak, nonatomic) IBOutlet SKAutoScrollLabel *scrollLabel;

// Scroll from right to left
self.scrollLabel.textContent = @"Fly me to the moon.Let me play among the stars.Let me see what spring is like on Jupiter and Mars.In other words, hold my hand.In other words, baby, kiss me.";
self.scrollLabel.direction = SK_AUTOSCROLL_DIRECTION_LEFT;
self.scrollLabel.backgroundColor = [UIColor orangeColor];
self.scrollLabel.textColor = [UIColor whiteColor];
// ... other settings

Parameter meaning

  • direction scrolling direction

    • SK_AUTOSCROLL_DIRECTION_RIGHT // Scroll from left to right
    • SK_AUTOSCROLL_DIRECTION_LEFT // Scroll from right to left
    • SK_AUTOSCROLL_DIRECTION_TOP // Scroll from bottom to top
    • SK_AUTOSCROLL_DIRECTION_BOTTOM // Scroll from top to bottom
  • pointsPerFrame The distance each frame moves.The default vaule is 1.0f.

  • labelSpacing The spacing of each scrolling label.The default vaule is 20.

  • textContent Plain text content.

  • attributedTextContent Rich text content.

  • textColor Plain text color.

  • font Plain text font.

  • textAlignment Plain text alignment.

  • enableFade Default YES. Enable gradients of lable boundaries to fade.

Control Method

- (void)pauseScroll; // Pause scrolling animation being played.
- (void)continueScroll; // Make a paused scrolling animation continue playing.

简述

SKAutoScrollLabel是一个同时支持水平/垂直两种类型的“跑马灯”效果的自动滚动UILabel。在滚动的边缘使用了梯度褪色来解决滚动边缘生硬的效果问题,总体效果呈现出混然天成的感觉,并且使用简单方便。如果你觉得还不错,请star支持一下吧~

特性

  • 支持上、下、左、右四个方向的自动滚动
  • 随时可自由控制的滚动暂停 / 继续
  • 应用前后台切换时,滚动行为不会被中断
  • 轻量级,最少仅需一行初始化代码即可完成创建
  • 控件梯度渐变效果柔和,更自然
  • 完善的注释与说明

效果图

如何开始

1.git clone [email protected]:shevakuilin/SKAutoScrollLabel.git,查看示例工程 Example

2.直接将目录下的 SKAutoScrollLabel 拷贝到你的工程中,或在Podfile文件中添加 pod 'SKAutoScrollLabel'

3.引用头文件 #import <SKAutoScrollLabel/SKAutoScrollLabel.h>

初始化

通过代码创建

// 创建一个从右向左滚动的,背景颜色为橙色,字体颜色为白色的滚动 Label
SKAutoScrollLabel *scrollLabel = [[SKAutoScrollLabel alloc] initWithTextContent:@"你指尖跃动的电光, 是我此生不灭的信仰! 唯我超电磁炮永世长存!! 哔哩哔哩(゜-゜)つロ干杯~-bilibili" direction: SK_AUTOSCROLL_DIRECTION_LEFT];
scrollLabel.backgroundColor = [UIColor orangeColor];
scrollLabel.textColor = [UIColor whiteColor];
// ... 其他设置

通过 storyboard 创建

// 在 storyboard 中将对象的类设置为 SKAutoScrollLabel
@property (weak, nonatomic) IBOutlet SKAutoScrollLabel *scrollLabel;

// 创建一个从右向左滚动的,背景颜色为橙色,字体颜色为白色的滚动 Label
self.scrollLabel.textContent = @"你指尖跃动的电光, 是我此生不灭的信仰! 唯我超电磁炮永世长存!! 哔哩哔哩(゜-゜)つロ干杯~-bilibili";
self.scrollLabel.direction = SK_AUTOSCROLL_DIRECTION_LEFT;
self.scrollLabel.backgroundColor = [UIColor orangeColor];
self.scrollLabel.textColor = [UIColor whiteColor];
// ... 其他设置

基本参数

  • direction 滚动方向

    • SK_AUTOSCROLL_DIRECTION_RIGHT // 从左向右滚动, 默认选项
    • SK_AUTOSCROLL_DIRECTION_LEFT // 从右向左滚动
    • SK_AUTOSCROLL_DIRECTION_TOP // 从下向上滚动
    • SK_AUTOSCROLL_DIRECTION_BOTTOM // 从上向下滚动
  • pointsPerFrame 每帧移动的距离。默认值为1.0f。

  • labelSpacing 每个滚动标签的间距。默认值为20。

  • textContent 普通文本内容

  • attributedTextContent 富文本内容

  • textColor 文本颜色

  • font 字体

  • textAlignment 文字对齐

  • enableFade 开关梯度渐变,默认开启

控制方法

- (void)pauseScroll; // 暂停滚动
- (void)continueScroll; // 继续滚动

感谢你花时间阅读以上内容, 如果这个项目能够帮助到你,记得告诉我

Email: [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].