admin
2022-09-04 fa05f89529e05078b29606e4beda3de5cfdce485
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
//  CSJVerticalScrollTextView.h
//  CSJAdSDK
//
//  Created by Rush.D.Xzj on 2021/8/13.
//  Copyright © 2019 bytedance. All rights reserved.
//
 
#import <UIKit/UIKit.h>
@class CSJVerticalScrollTextView;
 
 
@protocol CSJVerticalScrollTextViewDelegate <NSObject>
 
@optional
- (void)verticalScrollText:(CSJVerticalScrollTextView *)scrollText currentTextIndex:(NSInteger)index;
- (void)verticalScrollText:(CSJVerticalScrollTextView *)scrollText clickIndex:(NSInteger)index content:(NSString *)content;
 
@end
 
 
 
 
 
@interface CSJVerticalScrollTextView : UIView
 
@property (nonatomic,assign) id <CSJVerticalScrollTextViewDelegate>delegate;
 
// textDataArr 支持 NSString 和 NSAttributedString类型
// "textDataArr" support <NSString *> and <NSAttributedString *>
@property (nonatomic,copy)   NSArray * textDataArr;
 
 
// 文字停留时间,默认为3s。
// Text stay time,default is 3 seconds.
@property (nonatomic,assign) CGFloat textStayTime;
 
// 文字滚动动画时间,默认为1s。
// Text scrolling animation time,default is 1 seconds.
@property (nonatomic,assign) CGFloat scrollAnimationTime;
 
 
@property (nonatomic,copy)   UIFont  * textFont;
@property (nonatomic,copy)   UIColor * textColor;
@property (nonatomic)        NSTextAlignment textAlignment;
 
@property (nonatomic,assign) BOOL touchEnable; // defualt is YES
 
- (void)startScrollBottomToTopWithSpace;
- (void)startScrollTopToBottomWithSpace;
 
- (void)startScrollBottomToTopWithNoSpace;
- (void)startScrollTopToBottomWithNoSpace;
 
- (void)stop;
- (void)stopToEmpty;
 
@end