1. 程式人生 > >iOS文字上下滾動效果的實現

iOS文字上下滾動效果的實現

最近有一個文字上下滾動的需求,簡單寫了一下。

@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一下。