最近有一个文字上下滚动的需求,简单写了一下。
@class GYChangeTextView;
@protocol GYChangeTextViewDelegate <NSObject>
- (void)gyChangeTextView:(GYChangeTextView *)textView didTapedAtIndex:(NSInteger)index;
@end
@interface GYChangeTextView : UIView
@property (nonatomic, assign) id<GYChangeTextViewDelegate> delegate;
- (void)animationWithTexts:(NSArray *)textAry;
- (void)stopAnimation;
@end
代码传到了github上, https://github.com/iOSGongyu/GYChangeTextViewDemo,感兴趣的可以下载看看,如果对你有帮助的话,记得star一下。