All Projects → jinht → Marquee

jinht / Marquee

Licence: mit
跑马灯/滚动文字条(类似于淘宝/菜鸟/京东/支付宝/聚划算/网商银行等app的跑马灯功能)

Projects that are alternatives of or similar to Marquee

Newschannel
新闻频道栏/滚动栏(网易新闻,新浪新闻,搜狐新闻,今日头条,聚划算,腾讯视频,优酷等类的频道栏),支持小红点标识 && 懒加载 && 缓存 && 排序 && 增删等
Stars: ✭ 256 (-34.19%)
Mutual labels:  ios-sdk, scrollbar
Quantum Nox Firefox Dark Full Theme
These usercontent and userchrome files will give a full themed dark color to Firefox Quantum, menus and dialogs included, as well as the scrollbars. You can also use the JS files to enable multirow tabs and other functions.
Stars: ✭ 328 (-15.68%)
Mutual labels:  scrollbar
custom-scrollbars
ScrollBars customization tool
Stars: ✭ 20 (-94.86%)
Mutual labels:  scrollbar
Transformerslayout
🔥 App金刚区导航菜单,类似淘宝、QQ音乐等APP导航,方格布局横向多行滑动翻页带滚动条
Stars: ✭ 258 (-33.68%)
Mutual labels:  scrollbar
webex-ios-sdk
Integrate Webex into your iOS apps quickly. Example:https://github.com/webex/webex-ios-sdk-example API-reference:https://webex.github.io/webex-ios-sdk/ API-reference-v2:https://webex.github.io/webex-ios-sdk/v2/
Stars: ✭ 17 (-95.63%)
Mutual labels:  ios-sdk
Fakescroll
vanilla-js lightweight custom HTML scrollbar
Stars: ✭ 309 (-20.57%)
Mutual labels:  scrollbar
RatingBar
评分条/星级条(类似于淘宝/京东/1号店/亚马逊等商城类的评分条)
Stars: ✭ 50 (-87.15%)
Mutual labels:  ios-sdk
Ngx Scrollbar
Custom overlay-scrollbars with native scrolling mechanism
Stars: ✭ 355 (-8.74%)
Mutual labels:  scrollbar
react-native-lahk-marquee-label
A react-native marquee label component.
Stars: ✭ 49 (-87.4%)
Mutual labels:  marquee
Jxmarqueeview
A powerful and easy to use marquee view.
Stars: ✭ 324 (-16.71%)
Mutual labels:  marquee
clevertap-ios-sdk
CleverTap iOS SDK
Stars: ✭ 39 (-89.97%)
Mutual labels:  ios-sdk
vue-custom-scrollbar
Minimalistic but perfect custom scrollbar component for Vue.JS
Stars: ✭ 95 (-75.58%)
Mutual labels:  scrollbar
Intercom Ios
📱 Intercom for iOS, for integrating Intercom into your iOS application.
Stars: ✭ 312 (-19.79%)
Mutual labels:  ios-sdk
react-native-marquee
React Native Marquee Text Component
Stars: ✭ 101 (-74.04%)
Mutual labels:  marquee
Marqueeview
俗名:可垂直跑、可水平跑的跑马灯;学名:可垂直翻、可水平翻的翻页公告
Stars: ✭ 3,600 (+825.45%)
Mutual labels:  marquee
vim-sclow
👾 Text-based scrollbar for Vim
Stars: ✭ 23 (-94.09%)
Mutual labels:  scrollbar
Uumarqueeview
[iOS]Customizable marquee view. #Marquee,MarqueeView,跑马灯,滚屏,上翻,左滑,多行,自定义
Stars: ✭ 295 (-24.16%)
Mutual labels:  marquee
Onesignal Ios Sdk
OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native iOS app with OneSignal. https://onesignal.com
Stars: ✭ 370 (-4.88%)
Mutual labels:  ios-sdk
Marqueelabel
Charles Powell
Stars: ✭ 3,741 (+861.7%)
Mutual labels:  marquee
Fwplayer
A video player SDK for iOS, it is based on AVPlayer. https://se.linkedin.com/in/foks-huiwang, https://fokswang.wixsite.com/home
Stars: ✭ 321 (-17.48%)
Mutual labels:  ios-sdk

Marquee(跑马灯)

说一下初衷吧,最初要用到跑马灯功能的时候,也找过一些SDK,但未能找到与我需求很好契合的SDK,主要就是手势滑动后的问题(手势滑动push/pop时候跑马灯出现失灵的状况),目前支持水平 && 上下(正向 && 逆向)滚动,解决push/pop && 前后台切换 && 手势滑动 && 意外中断等情况,希望通过此SDK给予与我有同样需求的童鞋一些帮助。

先上图,看一下是否符合你的场景吧!

Function Description

  1. 轻量级跑马灯
  2. 支持attributedText
  3. 随时获取跑马灯状态
  4. 前/后台切换重新加载
  5. 水平 && 上下(正向 && 逆向)
  6. push/pop || 前后台切换 || 手势返回后自动滚动

How to use

1. podfile

platform:ios, '8.0'

target '*****' do

pod 'JhtMarquee'
        
end

2. 水平:水平向左滚动的跑马灯

a. 简单的集成方式:当成一个普通label使用即可,在初始化方法的时候可以自定义单次滚动时间

/** 初始化
 *  duration: 单次滚动时间
 *  注: duration = 0.0,使用内部自适应计算功能
 */
- (instancetype)initWithFrame:(CGRect)frame withSingleScrollDuration:(NSTimeInterval)duration;

b. 状态自由设置:通过以下方法传入相应的MarqueeState_H枚举值即可

/** 设置跑马灯状态
 *  marqueeState:跑马灯状态(枚举)
 *  注:“开启跑马灯”放在viewDidAppear中,“关闭跑马灯”放在viewWillDisappear中
 */
- (void)marqueeOfSettingWithState:(MarqueeState_H)marqueeState;
  • 注:demo中有详细使用的方法,集成的时候按其方式使用即可,此外,还要注意一下开启/关闭跑马灯方法放置的函数
- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    
    // 开启跑马灯
    [_marquee marqueeOfSettingWithState:MarqueeStart];
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    
    // 关闭跑马灯
    [_marquee marqueeOfSettingWithState:MarqueeShutDown];
}

3. 上下:上下(正向 && 逆向)滚动的跑马灯

a. 简单的集成方式:正常初始化后,传入滚动文字的数据源数组即可

b. 状态自由设置:通过以下方法传入相应的MarqueeState_V枚举值即可

/** 设置跑马灯状态
 *  marqueeState:跑马灯状态(枚举)
 */
- (void)marqueeOfSettingWithState:(MarqueeState_V)marqueeState;

c. 实时回调:通过index属性和scrollWithCallbackBlock方法可以实时获取当前展示文字在数据源数组中的位置

/** 当前显示展示的文字在数据源数组中的索引_只读 */
@property (nonatomic, assign) NSInteger index;

/** 每次滚动回调的Block */
- (void)scrollWithCallbackBlock:(verticalMarqueeBlock)block;

d. 个性化设置:可通过以下属性进行个性化的设置

/** 是否为逆时针滚动(default:NO)
 *  顺时针:底部 ===> 顶部
 *  逆时针:顶部 ===> 底部
 */
@property (nonatomic, assign) BOOL isCounterclockwise;

/** 单次滚动时间(default:0.5f) */
@property (nonatomic, assign) CGFloat scrollDuration;
/** 滚动延迟(default:2.5f) */
@property (nonatomic, assign) CGFloat scrollDelay;

/** 滚动字的颜色(default:blackColor) */
@property (nonatomic, strong) UIColor *verticalTextColor;
/** 滚动的字体(default:14) */
@property (nonatomic, strong) UIFont *verticalTextFont;
/** 显示内容的对齐方式(default:NSTextAlignmentLeft) */
@property (nonatomic, assign) NSTextAlignment verticalTextAlignment;
/** 显示内容的行数(default:2) */
@property (nonatomic, assign) NSInteger verticalNumberOfLines;
  • 在demo中可以查看具体使用方法(使用demo之前请先 pod install

Remind

  • ARC
  • iOS >= 8.0
  • iPhone \ iPad

Hope

  • If you find bug when used,Hope you can Issues me,Thank you or try to download the latest code of this framework to see the BUG has been fixed or not
  • If you find the function is not enough when used,Hope you can Issues me,I very much to add more useful function to this framework ,Thank you !
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].