├── .gitignore ├── JiKeScrollShow ├── JiKeAnimationStatus.h ├── JiKeScrollImageView.h ├── JiKeScrollImageView.m ├── JiKeScrollLabel.h ├── JiKeScrollLabel.m ├── JiKeScrollView.h ├── JiKeScrollView.m ├── JiKeSignalScrollView.h ├── JiKeSignalScrollView.m └── tempBack.png ├── JiKeScrollView └── JiKeScrollView.xcodeproj │ └── project.xcworkspace │ └── xcshareddata │ └── JiKeScrollView.xcscmblueprint ├── JikeScrollView ├── JikeScrollView.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── JikeScrollView │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── background-1.imageset │ │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── HomeTableViewController.h │ ├── HomeTableViewController.m │ ├── Info.plist │ ├── JiKeScrollImageViewVC.h │ ├── JiKeScrollImageViewVC.m │ ├── JiKeScrollImageViewVC.xib │ ├── JiKeScrollLabelVC.h │ ├── JiKeScrollLabelVC.m │ ├── JiKeScrollLabelVC.xib │ ├── JiKeScrollViewVC.h │ ├── JiKeScrollViewVC.m │ ├── Sources │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 10.png │ │ ├── 11.png │ │ ├── 12.png │ │ ├── 13.png │ │ ├── 14.png │ │ ├── 15.png │ │ ├── 16.png │ │ ├── 17.png │ │ ├── 18.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 8.png │ │ ├── 9.png │ │ ├── Cionfig.h │ │ ├── LLTool.h │ │ ├── LLTool.m │ │ ├── LxDBAnything.h │ │ ├── UIView+Frame.h │ │ ├── UIView+Frame.m │ │ ├── background@2x.png │ │ └── background@3x.png │ └── main.m ├── JikeScrollViewTests │ ├── Info.plist │ └── JikeScrollViewTests.m └── JikeScrollViewUITests │ ├── Info.plist │ └── JikeScrollViewUITests.m ├── LICENSE ├── README.md └── screenShot └── JikeScrollView.gif /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | # CocoaPods 31 | # 32 | # We recommend against adding the Pods directory to your .gitignore. However 33 | # you should judge for yourself, the pros and cons are mentioned at: 34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 35 | # 36 | # Pods/ 37 | 38 | # Carthage 39 | # 40 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 41 | # Carthage/Checkouts 42 | 43 | Carthage/Build 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | 55 | #Code Injection 56 | # 57 | # After new code Injection tools there's a generated folder /iOSInjectionProject 58 | # https://github.com/johnno1962/injectionforxcode 59 | 60 | iOSInjectionProject/ 61 | -------------------------------------------------------------------------------- /JiKeScrollShow/JiKeAnimationStatus.h: -------------------------------------------------------------------------------- 1 | // 2 | // JiKeAnimationStatus.h 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/23. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #ifndef JiKeAnimationStatus_h 10 | #define JiKeAnimationStatus_h 11 | 12 | typedef enum 13 | { 14 | // UIView Animation Run Status 15 | STATUS_BEGIN = 0, 16 | STATUS_RUNNING, 17 | STATUS_END 18 | 19 | } JiKeAnimationStatus; 20 | 21 | #endif /* JiKeAnimationStatus_h */ 22 | -------------------------------------------------------------------------------- /JiKeScrollShow/JiKeScrollImageView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JiKeScrollImageView.h 3 | // JikePictureShow 4 | // 5 | // Created by 李龙 on 16/11/21. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface JiKeScrollImageView : UIView 13 | 14 | /** 15 | 设置首次进入程序先显示的图片名称或者链接(自行扩展增加网络图片加载) 16 | ,不执行滚动 17 | */ 18 | @property (nonatomic,strong) NSArray *myFirstShowImageLinkArray; 19 | 20 | 21 | /** 22 | 下一张要显示的图片名称或者链接 23 | */ 24 | @property (nonatomic,copy) NSString *myNextShowImageLink; 25 | 26 | 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /JiKeScrollShow/JiKeScrollImageView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JiKeScrollImageView.m 3 | // JikePictureShow 4 | // 5 | // Created by 李龙 on 16/11/21. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import "JiKeScrollImageView.h" 10 | #import "JiKeAnimationStatus.h" 11 | #import "UIView+Frame.h" 12 | #import "Cionfig.h" 13 | 14 | @interface JiKeScrollImageView () 15 | 16 | //图片 17 | @property (nonatomic,strong) UIImageView *myImageView0; 18 | @property (nonatomic,strong) UIImageView *myImageView1; 19 | @property (nonatomic,strong) UIView *myCoverView; 20 | @property (nonatomic,strong) NSArray *myImageViewArray; 21 | @end 22 | 23 | 24 | @implementation JiKeScrollImageView{ 25 | int _scrollIndex; 26 | 27 | CGFloat _originalTopY; 28 | CGFloat _originalCenterY; 29 | CGFloat _originalDownY; 30 | 31 | //动画执行标记 32 | JiKeAnimationStatus animStatus; 33 | } 34 | 35 | 36 | -(instancetype)initWithFrame:(CGRect)frame{ 37 | if (self = [super initWithFrame:frame]) { 38 | //初始化控件 39 | [self initSubViews]; 40 | } 41 | return self; 42 | } 43 | 44 | 45 | 46 | 47 | - (NSArray *)myImageViewArray 48 | { 49 | if (!_myImageViewArray) { 50 | UIImageView *iconView0 = [[UIImageView alloc] init]; 51 | iconView0.image = [UIImage imageNamed:@"tempBack"]; 52 | iconView0.layer.cornerRadius = 5; 53 | iconView0.layer.masksToBounds = YES; 54 | 55 | UIImageView *iconView1 = [[UIImageView alloc] init]; 56 | iconView1.image = [UIImage imageNamed:@"tempBack"]; 57 | iconView1.layer.cornerRadius = 5; 58 | iconView1.layer.masksToBounds = YES; 59 | 60 | _myImageViewArray = [NSArray arrayWithObjects:iconView0,iconView1, nil]; 61 | } 62 | return _myImageViewArray; 63 | } 64 | 65 | 66 | 67 | - (void)initSubViews{ 68 | 69 | 70 | CGFloat topMargin = LLTBMargin; 71 | CGFloat iconWH = self.frame.size.width; 72 | 73 | _originalTopY = -iconWH; 74 | _originalCenterY = 0; 75 | _originalDownY = iconWH; 76 | 77 | 78 | UIView *backView = [[UIView alloc] initWithFrame:CGRectMake(0, topMargin, iconWH, iconWH)]; 79 | backView.clipsToBounds = YES; 80 | [self addSubview:backView]; 81 | 82 | 83 | _myImageView0 = ({ 84 | UIImageView *iconView0 = self.myImageViewArray[0]; 85 | iconView0.contentMode = UIViewContentModeScaleAspectFill; 86 | iconView0.frame = (CGRect){0,_originalCenterY,iconWH,iconWH}; 87 | [backView addSubview:iconView0]; 88 | iconView0; 89 | }); 90 | 91 | 92 | _myImageView1 = ({ 93 | UIImageView *iconView1 = self.myImageViewArray[1]; 94 | iconView1.frame = (CGRect){0,_originalTopY,iconWH,iconWH}; 95 | iconView1.contentMode = UIViewContentModeScaleAspectFill; 96 | [backView addSubview:iconView1]; 97 | iconView1; 98 | }); 99 | 100 | 101 | _myCoverView = ({ 102 | UIView *coverView = [UIView new]; 103 | coverView.frame = _myImageView0.frame; 104 | coverView.backgroundColor = [UIColor blackColor]; 105 | coverView.alpha = 0.f; 106 | coverView.layer.cornerRadius = 5; 107 | coverView.hidden = YES; 108 | [backView addSubview:coverView]; 109 | coverView; 110 | }); 111 | 112 | _scrollIndex = 0; 113 | } 114 | 115 | 116 | - (void)beiginScrollDown{ 117 | _scrollIndex++; 118 | 119 | [self runAnimation]; 120 | } 121 | 122 | 123 | - (void)runAnimation{ 124 | 125 | void (^changeBlock)() = ^(){ 126 | animStatus = STATUS_RUNNING; 127 | 128 | if (_scrollIndex == 1) { 129 | _myImageView1.y = _originalCenterY; 130 | _myImageView0.y = _originalDownY; 131 | 132 | }else if(_scrollIndex == 2){ 133 | 134 | _myImageView1.y = _originalDownY; 135 | _myImageView0.y = _originalCenterY; 136 | 137 | _scrollIndex = 0; 138 | } 139 | 140 | //蒙版 141 | _myCoverView.hidden = NO; 142 | _myCoverView.alpha = 0.3f; 143 | _myCoverView.y =_originalDownY; 144 | }; 145 | 146 | 147 | void (^completionBlock)(BOOL) = ^(BOOL finished){ 148 | 149 | if(finished){ 150 | if (_scrollIndex == 1) { 151 | _myImageView0.y = _originalTopY; 152 | _myImageView0.image = [UIImage imageNamed:_myNextShowImageLink]; 153 | }else if(_scrollIndex == 0){ 154 | _myImageView1.y = _originalTopY; 155 | _myImageView1.image = [UIImage imageNamed:_myNextShowImageLink]; 156 | } 157 | //蒙版归位 158 | _myCoverView.hidden = YES; 159 | _myCoverView.alpha = 0.f; 160 | _myCoverView.y =_originalCenterY; 161 | 162 | animStatus = STATUS_END; 163 | } 164 | }; 165 | 166 | [self doAnimation:changeBlock completion:completionBlock]; 167 | 168 | } 169 | 170 | 171 | 172 | - (void)doAnimation:(void(^)())changeBK completion:(void(^)(BOOL finished))competionBK{ 173 | [UIView animateWithDuration:0.6f delay:0.1f options:UIViewAnimationOptionCurveEaseInOut animations:changeBK completion:competionBK]; 174 | } 175 | 176 | 177 | 178 | #pragma mark ================ 传入数据处理 ================ 179 | -(void)setMyFirstShowImageLinkArray:(NSArray *)myFirstShowImageLinkArray{ 180 | if(myFirstShowImageLinkArray == nil || myFirstShowImageLinkArray.count < 2) 181 | ULog(@"请设置两张初始化图片"); 182 | 183 | _myFirstShowImageLinkArray = myFirstShowImageLinkArray; 184 | _myImageView0.image = [UIImage imageNamed:myFirstShowImageLinkArray[0]]; 185 | _myImageView1.image = [UIImage imageNamed:myFirstShowImageLinkArray[1]]; 186 | } 187 | 188 | 189 | //在设置myFirstShowImageLink之后,传入后自动调用下一个张操作 190 | -(void)setMyNextShowImageLink:(NSString *)myNextShowImageLink{ 191 | //保证动画当前顺序执行 192 | if (animStatus == STATUS_RUNNING) 193 | return; 194 | 195 | //处理数据 196 | if(_myFirstShowImageLinkArray == nil || _myFirstShowImageLinkArray.count < 2) 197 | ULog(@"还是先设置两张初始化图片吧"); 198 | 199 | _myNextShowImageLink = myNextShowImageLink; 200 | 201 | [self beiginScrollDown]; 202 | } 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | @end 229 | -------------------------------------------------------------------------------- /JiKeScrollShow/JiKeScrollLabel.h: -------------------------------------------------------------------------------- 1 | // 2 | // JiKeScrollLabel.h 3 | // JikePictureShow 4 | // 5 | // Created by 李龙 on 16/11/21. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JiKeScrollLabel : UIView 12 | 13 | //- (void)beiginScrollDown; 14 | 15 | /** 16 | 设置首次进入程序先显示的图片名称或者链接(自行扩展增加网络图片加载) 17 | ,不执行滚动 18 | */ 19 | @property (nonatomic,strong) NSArray *myFirstShowLabelDesArray; 20 | 21 | 22 | /** 23 | 下一张要显示的图片名称或者链接 24 | */ 25 | @property (nonatomic,copy) NSString *myNextShowLabelDes; 26 | 27 | 28 | 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /JiKeScrollShow/JiKeScrollLabel.m: -------------------------------------------------------------------------------- 1 | // 2 | // JiKeScrollLabel.m 3 | // JikePictureShow 4 | // 5 | // Created by 李龙 on 16/11/21. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import "JiKeScrollLabel.h" 10 | #import "JiKeAnimationStatus.h" 11 | #import "UIView+Frame.h" 12 | #import "Cionfig.h" 13 | 14 | 15 | @interface JiKeScrollLabel () 16 | 17 | 18 | @property (nonatomic,strong) UILabel *myLabel0; 19 | @property (nonatomic,strong) UILabel *myLabel1; 20 | @property (nonatomic,strong) NSArray *myLabelArray; 21 | 22 | @end 23 | 24 | 25 | @implementation JiKeScrollLabel 26 | { 27 | int _scrollIndex; 28 | 29 | CGFloat _originalTopY; 30 | CGFloat _originalCenterY; 31 | CGFloat _originalDownY; 32 | 33 | NSString *currentShowDes; 34 | 35 | //动画执行标记 36 | JiKeAnimationStatus animStatus; 37 | } 38 | 39 | 40 | -(instancetype)initWithFrame:(CGRect)frame{ 41 | if (self = [super initWithFrame:frame]) { 42 | //初始化控件 43 | [self initSubViews]; 44 | } 45 | return self; 46 | } 47 | 48 | 49 | - (NSArray *)myLabelArray 50 | { 51 | if (!_myLabelArray) { 52 | UILabel *label0 = [[UILabel alloc] init]; 53 | UILabel *label1 = [[UILabel alloc] init]; 54 | _myLabelArray = [NSArray arrayWithObjects:label0,label1, nil]; 55 | } 56 | return _myLabelArray; 57 | } 58 | 59 | 60 | 61 | 62 | - (void)initSubViews{ 63 | 64 | CGFloat labelW = self.frame.size.width; 65 | CGFloat labelH = self.frame.size.height; 66 | 67 | CGFloat topMargin = 0; 68 | 69 | _originalTopY = topMargin-labelH; 70 | _originalCenterY = topMargin; 71 | _originalDownY = topMargin+labelH; 72 | 73 | UIFont *labelFont = LLLabelFont; 74 | 75 | UIView *backView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, labelW, labelH)]; 76 | backView.clipsToBounds = YES; 77 | [self addSubview:backView]; 78 | 79 | 80 | 81 | _myLabel0 = ({ 82 | UILabel *label = self.myLabelArray[0]; 83 | label.frame = (CGRect){0,_originalCenterY,labelW,labelH}; 84 | label.numberOfLines = 0; 85 | label.font = labelFont; 86 | [backView addSubview:label]; 87 | label; 88 | }); 89 | 90 | _myLabel1 = ({ 91 | UILabel *label = self.myLabelArray[1]; 92 | label.frame = (CGRect){0,_originalTopY,labelW,labelH}; 93 | label.numberOfLines = 0; 94 | label.font = labelFont; 95 | [backView addSubview:label]; 96 | label; 97 | }); 98 | 99 | _scrollIndex = 0; 100 | } 101 | 102 | 103 | - (void)beiginScrollDown{ 104 | _scrollIndex++; 105 | [self runAnimation]; 106 | } 107 | 108 | - (void)runAnimation{ 109 | 110 | _myLabel0.alpha = 1; 111 | _myLabel1.alpha = 1; 112 | 113 | void (^changeBlock)() = ^(){ 114 | animStatus = STATUS_RUNNING; 115 | 116 | if ([self isInTwoWholeLine:currentShowDes]) { 117 | //第一个动画 118 | if (_scrollIndex == 1) { 119 | _myLabel1.y = _originalCenterY; 120 | 121 | _myLabel0.y = _originalDownY; 122 | _myLabel0.alpha = 0.3; 123 | 124 | }else if(_scrollIndex == 2){ 125 | 126 | _myLabel0.y = _originalCenterY; 127 | 128 | _myLabel1.y = _originalDownY; 129 | _myLabel1.alpha = 0.3; 130 | 131 | _scrollIndex = 0; //标记归0 132 | } 133 | 134 | }else{ 135 | //叠影动画逻辑 136 | //当前正在显示的label的动画执行时间比即将显示的label的动画执行时间延迟一些执行,产生叠影效果 137 | if (_scrollIndex == 1) { 138 | 139 | _myLabel1.y = _originalCenterY; 140 | 141 | void (^overlapChangeBlock)() = ^(){ 142 | _myLabel0.alpha = 0.2; 143 | _myLabel0.y = _originalDownY; 144 | }; 145 | 146 | 147 | [self doAnimationWithDuration:0.4f delay:0.2f change:overlapChangeBlock completion:nil]; 148 | 149 | }else if(_scrollIndex == 2){ 150 | 151 | _myLabel0.y = _originalCenterY; 152 | 153 | void (^overlapChangeBlock)() = ^(){ 154 | _myLabel1.alpha = 0.2; 155 | _myLabel1.y = _originalDownY; 156 | }; 157 | 158 | [self doAnimationWithDuration:0.4f delay:0.2f change:overlapChangeBlock completion:nil]; 159 | 160 | _scrollIndex = 0; //标记归0 161 | } 162 | } 163 | 164 | }; 165 | 166 | 167 | 168 | void (^completionBlock)(BOOL) = ^(BOOL finished){ 169 | if(finished){ 170 | 171 | //第一个动画 172 | if (_scrollIndex == 1) { 173 | 174 | _myLabel0.alpha = 0; 175 | _myLabel0.y = _originalTopY; 176 | _myLabel0.alpha = 1; 177 | _myLabel0.text = [self getRealShowStr:_myNextShowLabelDes]; 178 | 179 | currentShowDes = _myLabel1.text; 180 | }else if(_scrollIndex == 0){ 181 | 182 | _myLabel1.alpha = 0; 183 | _myLabel1.y = _originalTopY; 184 | _myLabel1.alpha = 1; 185 | _myLabel1.text = [self getRealShowStr:_myNextShowLabelDes]; 186 | 187 | currentShowDes = _myLabel0.text; 188 | } 189 | animStatus = STATUS_END; 190 | } 191 | }; 192 | 193 | [self doAnimationWithDuration:0.6f delay:0.1f change:changeBlock completion:completionBlock]; 194 | } 195 | 196 | 197 | - (void)doAnimationWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay change:(void(^)())changeBK completion:(void(^)(BOOL finished))competionBK{ 198 | [UIView animateWithDuration:duration delay:delay options:UIViewAnimationOptionCurveEaseInOut animations:changeBK completion:competionBK]; 199 | } 200 | 201 | 202 | #pragma mark ================ 处理数据 ================ 203 | -(void)setMyFirstShowLabelDesArray:(NSArray *)myFirstShowLabelDesArray{ 204 | if(myFirstShowLabelDesArray == nil || myFirstShowLabelDesArray.count < 2) 205 | ULog(@"请设置两张初始化图片的描述"); 206 | _myFirstShowLabelDesArray = myFirstShowLabelDesArray; 207 | currentShowDes = myFirstShowLabelDesArray[0]; 208 | _myLabel0.text = [self getRealShowStr:myFirstShowLabelDesArray[0]]; 209 | _myLabel1.text = [self getRealShowStr:myFirstShowLabelDesArray[1]]; 210 | 211 | } 212 | 213 | 214 | -(void)setMyNextShowLabelDes:(NSString *)myNextShowLabelDes{ 215 | 216 | //保证动画当前顺序执行 217 | if (animStatus == STATUS_RUNNING) 218 | return; 219 | 220 | //数据处理 221 | if(_myFirstShowLabelDesArray == nil || _myFirstShowLabelDesArray.count < 2) 222 | ULog(@"还是设置完整图片描述吧"); 223 | _myNextShowLabelDes = myNextShowLabelDes; 224 | 225 | [self beiginScrollDown]; 226 | } 227 | 228 | 229 | 230 | - (BOOL)isInTwoWholeLine:(NSString *)str{ 231 | CGSize labelSize = [LLTool getSizeWithStrig:str font:LLLabelFont maxSize:(CGSize){MAXFLOAT,MAXFLOAT}]; 232 | return labelSize.width>self.width; 233 | } 234 | 235 | 236 | - (NSString *)getRealShowStr:(NSString *)str{ 237 | CGSize labelSize = [LLTool getSizeWithStrig:str font:LLLabelFont maxSize:(CGSize){MAXFLOAT,MAXFLOAT}]; 238 | if (labelSize.width <= self.frame.size.width) { 239 | str = [str stringByAppendingString:@"\n"]; 240 | } 241 | return str; 242 | } 243 | 244 | 245 | 246 | 247 | @end 248 | -------------------------------------------------------------------------------- /JiKeScrollShow/JiKeScrollView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JiKeScrollView.h 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/23. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JiKeScrollView : UIView 12 | 13 | @property (nonatomic,strong) NSArray *myFirstShowImageLinkArray; 14 | @property (nonatomic,strong) NSArray *myFirstShowLabelDesArray; 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | @property (nonatomic,strong) NSArray *myNextShowImageLinkArray; 23 | @property (nonatomic,strong) NSArray *myNextShowLabelDesArray; 24 | 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /JiKeScrollShow/JiKeScrollView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JiKeScrollView.m 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/23. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import "JiKeScrollView.h" 10 | #import "JiKeSignalScrollView.h" 11 | #import "Cionfig.h" 12 | 13 | @interface JiKeScrollView () 14 | 15 | @property (nonatomic,strong) JiKeSignalScrollView *myJikeSignalScrollView; 16 | 17 | @property (nonatomic,strong) NSMutableArray *myShowViewArray; 18 | 19 | @end 20 | 21 | @implementation JiKeScrollView 22 | 23 | -(instancetype)initWithFrame:(CGRect)frame{ 24 | if (self = [super initWithFrame:frame]) { 25 | //初始化控件 26 | [self initSubViews]; 27 | } 28 | return self; 29 | } 30 | 31 | 32 | 33 | - (void)initSubViews{ 34 | 35 | _myShowViewArray = [NSMutableArray arrayWithCapacity:3]; 36 | 37 | CGFloat singalScrollViewWidth = (LLScreenWidth - LLLRMargin*2 - LLverticalMargin*2)*0.3333; 38 | CGSize labelSize = [LLTool getSizeWithStrig:@"测试" font:LLLabelFont maxSize:(CGSize){singalScrollViewWidth,MAXFLOAT}]; 39 | CGFloat singalScrollViewHeight = LLTBMargin*2 + LLhorizontalMargin + singalScrollViewWidth + labelSize.height*2; 40 | 41 | LxDBAnyVar(labelSize); 42 | LxDBAnyVar(singalScrollViewWidth); 43 | LxDBAnyVar(singalScrollViewHeight); 44 | 45 | for (int i = 0; i < 3; i++) { 46 | JiKeSignalScrollView *signalScrollView = [[JiKeSignalScrollView alloc] initWithFrame:(CGRect){LLLRMargin+(singalScrollViewWidth+LLverticalMargin)*i,0,singalScrollViewWidth,singalScrollViewHeight} withScrollLabelSize:labelSize]; 47 | [self addSubview:signalScrollView]; 48 | [_myShowViewArray addObject:signalScrollView]; 49 | } 50 | 51 | } 52 | 53 | 54 | 55 | 56 | //处理首次传入的数据 57 | -(void)setMyFirstShowLabelDesArray:(NSArray *)myFirstShowLabelDesArray{ 58 | if(myFirstShowLabelDesArray.count <3) 59 | ULog(@"请传入三个图片描述"); 60 | [self setFisrtJikeScrollLabelData:myFirstShowLabelDesArray]; 61 | } 62 | 63 | -(void)setMyFirstShowImageLinkArray:(NSArray *)myFirstShowImageLinkArray{ 64 | if(myFirstShowImageLinkArray.count <3) 65 | ULog(@"请传入三张图片的链接"); 66 | [self setFisrtJikeScrollImageData:myFirstShowImageLinkArray]; 67 | } 68 | 69 | 70 | 71 | //执行下次数据动画 72 | -(void)setMyNextShowLabelDesArray:(NSArray *)myNextShowLabelDesArray{ 73 | if(myNextShowLabelDesArray.count <3) 74 | ULog(@"请传入下一个三个图片描述"); 75 | [self runJikeScrollLabelView:myNextShowLabelDesArray]; 76 | } 77 | -(void)setMyNextShowImageLinkArray:(NSArray *)myNextShowImageLinkArray{ 78 | if(myNextShowImageLinkArray.count <3) 79 | ULog(@"请传入下一个三张图片的链接"); 80 | [self runJikeScrollImageView:myNextShowImageLinkArray]; 81 | } 82 | 83 | 84 | 85 | //初始化数据 86 | - (void)setFisrtJikeScrollImageData:(NSArray *)data{ 87 | for (int i = 0; i < data.count; i++) { 88 | JiKeSignalScrollView *signView = _myShowViewArray[i]; 89 | signView.myFirstShowImageLinkArray = data[i]; 90 | 91 | } 92 | } 93 | - (void)setFisrtJikeScrollLabelData:(NSArray *)data{ 94 | for (int i = 0; i < data.count; i++) { 95 | JiKeSignalScrollView *signView = _myShowViewArray[i]; 96 | signView.myFirstShowLabelDesArray = data[i]; 97 | } 98 | } 99 | 100 | 101 | //执行动画 102 | - (void)runJikeScrollImageView:(NSArray *)data{ 103 | for (int i = 0; i < data.count; i++) { 104 | 105 | void(^tempDelayRunBlock)() = ^(){ 106 | JiKeSignalScrollView *signView = _myShowViewArray[i]; 107 | signView.myNextShowImageLink = data[i]; 108 | }; 109 | [self delayRun:tempDelayRunBlock index:i]; 110 | } 111 | } 112 | - (void)runJikeScrollLabelView:(NSArray *)data{ 113 | for (int i = 0; i < data.count; i++) { 114 | void(^tempDelayRunBlock)() = ^(){ 115 | JiKeSignalScrollView *signView = _myShowViewArray[i]; 116 | signView.myNextShowLabelDes = data[i]; 117 | }; 118 | 119 | [self delayRun:tempDelayRunBlock index:i]; 120 | } 121 | } 122 | 123 | 124 | //延迟执行代码 125 | - (void)delayRun:(void (^)())delayRunBlock index:(int)index{ 126 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1*index * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 127 | if (delayRunBlock) 128 | delayRunBlock(); 129 | }); 130 | } 131 | 132 | @end 133 | -------------------------------------------------------------------------------- /JiKeScrollShow/JiKeSignalScrollView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JiKeScrollView.h 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/23. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JiKeSignalScrollView : UIView 12 | 13 | -(instancetype)initWithFrame:(CGRect)frame withScrollLabelSize:(CGSize)labelSize; 14 | 15 | @property (nonatomic,strong) NSArray *myFirstShowImageLinkArray; 16 | @property (nonatomic,strong) NSArray *myFirstShowLabelDesArray; 17 | 18 | 19 | @property (nonatomic,copy) NSString *myNextShowImageLink; 20 | @property (nonatomic,copy) NSString *myNextShowLabelDes; 21 | 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /JiKeScrollShow/JiKeSignalScrollView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JiKeScrollView.m 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/23. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import "JiKeSignalScrollView.h" 10 | #import "UIView+Frame.h" 11 | #import "JiKeScrollImageView.h" 12 | #import "JiKeScrollLabel.h" 13 | #import "Cionfig.h" 14 | 15 | @interface JiKeSignalScrollView () 16 | 17 | @property (nonatomic,strong) JiKeScrollImageView *myJiKeScrollImageView; 18 | @property (nonatomic,strong) JiKeScrollLabel *myJiKeScrollLabel; 19 | 20 | @property (nonatomic,strong) UIView *mySignleShowView; 21 | 22 | //模拟数据 23 | @property (nonatomic,strong) NSArray *tempDataArray; 24 | @end 25 | 26 | 27 | @implementation JiKeSignalScrollView{ 28 | int dataShowIndex; 29 | } 30 | 31 | -(instancetype)initWithFrame:(CGRect)frame withScrollLabelSize:(CGSize)labelSize{ 32 | 33 | if (self = [super initWithFrame:frame]) { 34 | //初始化控件 35 | [self initSubViewsWithLabelSize:labelSize]; 36 | } 37 | return self; 38 | } 39 | 40 | 41 | 42 | - (void)initSubViewsWithLabelSize:(CGSize)LabelSize{ 43 | 44 | //滚动图 45 | _myJiKeScrollImageView = ({ 46 | JiKeScrollImageView *scrollImageView = [[JiKeScrollImageView alloc] initWithFrame:(CGRect){0,0,self.frame.size.width,self.frame.size.width}]; 47 | [self addSubview:scrollImageView]; 48 | scrollImageView; 49 | }); 50 | 51 | 52 | //滚动文字 53 | _myJiKeScrollLabel = ({ 54 | CGFloat scrollLabelY = self.frame.size.height - LabelSize.height*2 - LLTBMargin; 55 | JiKeScrollLabel *scrollLabel = [[JiKeScrollLabel alloc] initWithFrame:(CGRect){0,scrollLabelY,self.frame.size.width,LabelSize.height*2}]; 56 | [self addSubview:scrollLabel]; 57 | scrollLabel; 58 | }); 59 | } 60 | 61 | 62 | 63 | 64 | //初始化数据 65 | -(void)setMyFirstShowLabelDesArray:(NSArray *)myFirstShowLabelDesArray{ 66 | _myJiKeScrollLabel.myFirstShowLabelDesArray = myFirstShowLabelDesArray; 67 | } 68 | 69 | -(void)setMyFirstShowImageLinkArray:(NSArray *)myFirstShowImageLinkArray{ 70 | _myJiKeScrollImageView.myFirstShowImageLinkArray = myFirstShowImageLinkArray; 71 | } 72 | 73 | 74 | 75 | //执行下一次显示动画 76 | -(void)setMyNextShowLabelDes:(NSString *)myNextShowLabelDes{ 77 | _myJiKeScrollLabel.myNextShowLabelDes = myNextShowLabelDes; 78 | } 79 | 80 | -(void)setMyNextShowImageLink:(NSString *)myNextShowImageLink{ 81 | _myJiKeScrollImageView.myNextShowImageLink = myNextShowImageLink; 82 | } 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | @end 92 | -------------------------------------------------------------------------------- /JiKeScrollShow/tempBack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JiKeScrollShow/tempBack.png -------------------------------------------------------------------------------- /JiKeScrollView/JiKeScrollView.xcodeproj/project.xcworkspace/xcshareddata/JiKeScrollView.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "565539C92E52E72EE88A3155406D3F264DDEBD43", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "565539C92E52E72EE88A3155406D3F264DDEBD43" : 9223372036854775807, 8 | "E955CF6293378C90EB78E5A094E275F3212B559C" : 9223372036854775807 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "981ACFAE-A1DF-4A1D-B6D8-18C45BBD9366", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "565539C92E52E72EE88A3155406D3F264DDEBD43" : "JiKeScrollView\/", 13 | "E955CF6293378C90EB78E5A094E275F3212B559C" : "" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "JiKeScrollView", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "JiKeScrollView\/JiKeScrollView.xcodeproj", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:lilongcnc\/JiKeScrollView.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "565539C92E52E72EE88A3155406D3F264DDEBD43" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:lilongcnc\/TestDemo0322.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "E955CF6293378C90EB78E5A094E275F3212B559C" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 89159B811DE719CF007411CB /* background@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 89159B7F1DE719CF007411CB /* background@2x.png */; }; 11 | 89159B821DE719CF007411CB /* background@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 89159B801DE719CF007411CB /* background@3x.png */; }; 12 | 89159B851DE7255F007411CB /* LLTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 89159B841DE7255F007411CB /* LLTool.m */; }; 13 | 89159B8D1DE72A56007411CB /* JiKeScrollImageViewVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 89159B8B1DE72A56007411CB /* JiKeScrollImageViewVC.m */; }; 14 | 89159B8E1DE72A56007411CB /* JiKeScrollImageViewVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 89159B8C1DE72A56007411CB /* JiKeScrollImageViewVC.xib */; }; 15 | 89159B921DE72A90007411CB /* JiKeScrollLabelVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 89159B901DE72A90007411CB /* JiKeScrollLabelVC.m */; }; 16 | 89159B931DE72A90007411CB /* JiKeScrollLabelVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 89159B911DE72A90007411CB /* JiKeScrollLabelVC.xib */; }; 17 | 89405B4C1DE4963A0098D1DC /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 89405B4B1DE4963A0098D1DC /* main.m */; }; 18 | 89405B4F1DE4963A0098D1DC /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 89405B4E1DE4963A0098D1DC /* AppDelegate.m */; }; 19 | 89405B551DE4963A0098D1DC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 89405B531DE4963A0098D1DC /* Main.storyboard */; }; 20 | 89405B571DE4963A0098D1DC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 89405B561DE4963A0098D1DC /* Assets.xcassets */; }; 21 | 89405B5A1DE4963A0098D1DC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 89405B581DE4963A0098D1DC /* LaunchScreen.storyboard */; }; 22 | 89405B651DE4963A0098D1DC /* JiKeScrollViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 89405B641DE4963A0098D1DC /* JiKeScrollViewTests.m */; }; 23 | 89405B701DE4963A0098D1DC /* JiKeScrollViewUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 89405B6F1DE4963A0098D1DC /* JiKeScrollViewUITests.m */; }; 24 | 89405B931DE496560098D1DC /* 1.png in Resources */ = {isa = PBXBuildFile; fileRef = 89405B7F1DE496560098D1DC /* 1.png */; }; 25 | 89405B941DE496560098D1DC /* 10.png in Resources */ = {isa = PBXBuildFile; fileRef = 89405B801DE496560098D1DC /* 10.png */; }; 26 | 89405B951DE496560098D1DC /* 11.png in Resources */ = {isa = PBXBuildFile; fileRef = 89405B811DE496560098D1DC /* 11.png */; }; 27 | 89405B961DE496560098D1DC /* 12.png in Resources */ = {isa = PBXBuildFile; fileRef = 89405B821DE496560098D1DC /* 12.png */; }; 28 | 89405B971DE496560098D1DC /* 13.png in Resources */ = {isa = PBXBuildFile; fileRef = 89405B831DE496560098D1DC /* 13.png */; }; 29 | 89405B981DE496560098D1DC /* 14.png in Resources */ = {isa = PBXBuildFile; fileRef = 89405B841DE496560098D1DC /* 14.png */; }; 30 | 89405B991DE496560098D1DC /* 15.png in Resources */ = {isa = PBXBuildFile; fileRef = 89405B851DE496560098D1DC /* 15.png */; }; 31 | 89405B9A1DE496560098D1DC /* 16.png in Resources */ = {isa = PBXBuildFile; fileRef = 89405B861DE496560098D1DC /* 16.png */; }; 32 | 89405B9B1DE496560098D1DC /* 18.png in Resources */ = {isa = PBXBuildFile; fileRef = 89405B871DE496560098D1DC /* 18.png */; }; 33 | 89405B9C1DE496560098D1DC /* 2.png in Resources */ = {isa = PBXBuildFile; fileRef = 89405B881DE496560098D1DC /* 2.png */; }; 34 | 89405B9D1DE496560098D1DC /* 3.png in Resources */ = {isa = PBXBuildFile; fileRef = 89405B891DE496560098D1DC /* 3.png */; }; 35 | 89405B9E1DE496560098D1DC /* 4.png in Resources */ = {isa = PBXBuildFile; fileRef = 89405B8A1DE496560098D1DC /* 4.png */; }; 36 | 89405B9F1DE496560098D1DC /* 5.png in Resources */ = {isa = PBXBuildFile; fileRef = 89405B8B1DE496560098D1DC /* 5.png */; }; 37 | 89405BA01DE496560098D1DC /* 6.png in Resources */ = {isa = PBXBuildFile; fileRef = 89405B8C1DE496560098D1DC /* 6.png */; }; 38 | 89405BA11DE496560098D1DC /* 7.png in Resources */ = {isa = PBXBuildFile; fileRef = 89405B8D1DE496560098D1DC /* 7.png */; }; 39 | 89405BA21DE496560098D1DC /* 8.png in Resources */ = {isa = PBXBuildFile; fileRef = 89405B8E1DE496560098D1DC /* 8.png */; }; 40 | 89405BA31DE496560098D1DC /* 9.png in Resources */ = {isa = PBXBuildFile; fileRef = 89405B8F1DE496560098D1DC /* 9.png */; }; 41 | 89405BA41DE496560098D1DC /* UIView+Frame.m in Sources */ = {isa = PBXBuildFile; fileRef = 89405B921DE496560098D1DC /* UIView+Frame.m */; }; 42 | 89A108731DE536B600C4066F /* 0.png in Resources */ = {isa = PBXBuildFile; fileRef = 89A108721DE536B600C4066F /* 0.png */; }; 43 | 89A108751DE5377600C4066F /* 17.png in Resources */ = {isa = PBXBuildFile; fileRef = 89A108741DE5377600C4066F /* 17.png */; }; 44 | 89A724A21DE6EF3700D01DD1 /* HomeTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 89A724A11DE6EF3700D01DD1 /* HomeTableViewController.m */; }; 45 | 89A724A61DE6F5D700D01DD1 /* JiKeScrollViewVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 89A724A51DE6F5D700D01DD1 /* JiKeScrollViewVC.m */; }; 46 | 89F269431DE7306C000495EF /* JiKeScrollImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 89F2693B1DE7306C000495EF /* JiKeScrollImageView.m */; }; 47 | 89F269441DE7306C000495EF /* JiKeScrollLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 89F2693D1DE7306C000495EF /* JiKeScrollLabel.m */; }; 48 | 89F269451DE7306C000495EF /* JiKeScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 89F2693F1DE7306C000495EF /* JiKeScrollView.m */; }; 49 | 89F269461DE7306C000495EF /* JiKeSignalScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 89F269411DE7306C000495EF /* JiKeSignalScrollView.m */; }; 50 | /* End PBXBuildFile section */ 51 | 52 | /* Begin PBXContainerItemProxy section */ 53 | 89405B611DE4963A0098D1DC /* PBXContainerItemProxy */ = { 54 | isa = PBXContainerItemProxy; 55 | containerPortal = 89405B3F1DE4963A0098D1DC /* Project object */; 56 | proxyType = 1; 57 | remoteGlobalIDString = 89405B461DE4963A0098D1DC; 58 | remoteInfo = JiKeScrollView; 59 | }; 60 | 89405B6C1DE4963A0098D1DC /* PBXContainerItemProxy */ = { 61 | isa = PBXContainerItemProxy; 62 | containerPortal = 89405B3F1DE4963A0098D1DC /* Project object */; 63 | proxyType = 1; 64 | remoteGlobalIDString = 89405B461DE4963A0098D1DC; 65 | remoteInfo = JiKeScrollView; 66 | }; 67 | /* End PBXContainerItemProxy section */ 68 | 69 | /* Begin PBXFileReference section */ 70 | 89159B7F1DE719CF007411CB /* background@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "background@2x.png"; sourceTree = ""; }; 71 | 89159B801DE719CF007411CB /* background@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "background@3x.png"; sourceTree = ""; }; 72 | 89159B831DE7255F007411CB /* LLTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLTool.h; path = JikeScrollView/Sources/LLTool.h; sourceTree = SOURCE_ROOT; }; 73 | 89159B841DE7255F007411CB /* LLTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LLTool.m; path = JikeScrollView/Sources/LLTool.m; sourceTree = SOURCE_ROOT; }; 74 | 89159B8A1DE72A56007411CB /* JiKeScrollImageViewVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JiKeScrollImageViewVC.h; path = JikeScrollView/JiKeScrollImageViewVC.h; sourceTree = SOURCE_ROOT; }; 75 | 89159B8B1DE72A56007411CB /* JiKeScrollImageViewVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JiKeScrollImageViewVC.m; path = JikeScrollView/JiKeScrollImageViewVC.m; sourceTree = SOURCE_ROOT; }; 76 | 89159B8C1DE72A56007411CB /* JiKeScrollImageViewVC.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = JiKeScrollImageViewVC.xib; path = JikeScrollView/JiKeScrollImageViewVC.xib; sourceTree = SOURCE_ROOT; }; 77 | 89159B8F1DE72A90007411CB /* JiKeScrollLabelVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JiKeScrollLabelVC.h; path = JikeScrollView/JiKeScrollLabelVC.h; sourceTree = SOURCE_ROOT; }; 78 | 89159B901DE72A90007411CB /* JiKeScrollLabelVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JiKeScrollLabelVC.m; path = JikeScrollView/JiKeScrollLabelVC.m; sourceTree = SOURCE_ROOT; }; 79 | 89159B911DE72A90007411CB /* JiKeScrollLabelVC.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = JiKeScrollLabelVC.xib; path = JikeScrollView/JiKeScrollLabelVC.xib; sourceTree = SOURCE_ROOT; }; 80 | 89405B471DE4963A0098D1DC /* JiKeScrollView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JiKeScrollView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 81 | 89405B4B1DE4963A0098D1DC /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 82 | 89405B4D1DE4963A0098D1DC /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 83 | 89405B4E1DE4963A0098D1DC /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 84 | 89405B541DE4963A0098D1DC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 85 | 89405B561DE4963A0098D1DC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 86 | 89405B591DE4963A0098D1DC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 87 | 89405B5B1DE4963A0098D1DC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 88 | 89405B601DE4963A0098D1DC /* JiKeScrollViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JiKeScrollViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 89 | 89405B641DE4963A0098D1DC /* JiKeScrollViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JiKeScrollViewTests.m; sourceTree = ""; }; 90 | 89405B661DE4963A0098D1DC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 91 | 89405B6B1DE4963A0098D1DC /* JiKeScrollViewUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JiKeScrollViewUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 92 | 89405B6F1DE4963A0098D1DC /* JiKeScrollViewUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JiKeScrollViewUITests.m; sourceTree = ""; }; 93 | 89405B711DE4963A0098D1DC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 94 | 89405B7F1DE496560098D1DC /* 1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 1.png; sourceTree = ""; }; 95 | 89405B801DE496560098D1DC /* 10.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 10.png; sourceTree = ""; }; 96 | 89405B811DE496560098D1DC /* 11.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 11.png; sourceTree = ""; }; 97 | 89405B821DE496560098D1DC /* 12.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 12.png; sourceTree = ""; }; 98 | 89405B831DE496560098D1DC /* 13.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 13.png; sourceTree = ""; }; 99 | 89405B841DE496560098D1DC /* 14.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 14.png; sourceTree = ""; }; 100 | 89405B851DE496560098D1DC /* 15.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 15.png; sourceTree = ""; }; 101 | 89405B861DE496560098D1DC /* 16.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 16.png; sourceTree = ""; }; 102 | 89405B871DE496560098D1DC /* 18.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 18.png; sourceTree = ""; }; 103 | 89405B881DE496560098D1DC /* 2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 2.png; sourceTree = ""; }; 104 | 89405B891DE496560098D1DC /* 3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 3.png; sourceTree = ""; }; 105 | 89405B8A1DE496560098D1DC /* 4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 4.png; sourceTree = ""; }; 106 | 89405B8B1DE496560098D1DC /* 5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 5.png; sourceTree = ""; }; 107 | 89405B8C1DE496560098D1DC /* 6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 6.png; sourceTree = ""; }; 108 | 89405B8D1DE496560098D1DC /* 7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 7.png; sourceTree = ""; }; 109 | 89405B8E1DE496560098D1DC /* 8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 8.png; sourceTree = ""; }; 110 | 89405B8F1DE496560098D1DC /* 9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 9.png; sourceTree = ""; }; 111 | 89405B901DE496560098D1DC /* Cionfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cionfig.h; sourceTree = ""; }; 112 | 89405B911DE496560098D1DC /* UIView+Frame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Frame.h"; sourceTree = ""; }; 113 | 89405B921DE496560098D1DC /* UIView+Frame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Frame.m"; sourceTree = ""; }; 114 | 89A108721DE536B600C4066F /* 0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 0.png; sourceTree = ""; }; 115 | 89A108741DE5377600C4066F /* 17.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 17.png; sourceTree = ""; }; 116 | 89A108921DE5920A00C4066F /* LxDBAnything.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LxDBAnything.h; sourceTree = ""; }; 117 | 89A724A01DE6EF3700D01DD1 /* HomeTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HomeTableViewController.h; path = JikeScrollView/HomeTableViewController.h; sourceTree = SOURCE_ROOT; }; 118 | 89A724A11DE6EF3700D01DD1 /* HomeTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HomeTableViewController.m; path = JikeScrollView/HomeTableViewController.m; sourceTree = SOURCE_ROOT; }; 119 | 89A724A41DE6F5D700D01DD1 /* JiKeScrollViewVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JiKeScrollViewVC.h; path = JikeScrollView/JiKeScrollViewVC.h; sourceTree = SOURCE_ROOT; }; 120 | 89A724A51DE6F5D700D01DD1 /* JiKeScrollViewVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JiKeScrollViewVC.m; path = JikeScrollView/JiKeScrollViewVC.m; sourceTree = SOURCE_ROOT; }; 121 | 89F269391DE7306C000495EF /* JiKeAnimationStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JiKeAnimationStatus.h; sourceTree = ""; }; 122 | 89F2693A1DE7306C000495EF /* JiKeScrollImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JiKeScrollImageView.h; sourceTree = ""; }; 123 | 89F2693B1DE7306C000495EF /* JiKeScrollImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JiKeScrollImageView.m; sourceTree = ""; }; 124 | 89F2693C1DE7306C000495EF /* JiKeScrollLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JiKeScrollLabel.h; sourceTree = ""; }; 125 | 89F2693D1DE7306C000495EF /* JiKeScrollLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JiKeScrollLabel.m; sourceTree = ""; }; 126 | 89F2693E1DE7306C000495EF /* JiKeScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JiKeScrollView.h; sourceTree = ""; }; 127 | 89F2693F1DE7306C000495EF /* JiKeScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JiKeScrollView.m; sourceTree = ""; }; 128 | 89F269401DE7306C000495EF /* JiKeSignalScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JiKeSignalScrollView.h; sourceTree = ""; }; 129 | 89F269411DE7306C000495EF /* JiKeSignalScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JiKeSignalScrollView.m; sourceTree = ""; }; 130 | 89F269481DE730C5000495EF /* tempBack.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tempBack.png; sourceTree = ""; }; 131 | /* End PBXFileReference section */ 132 | 133 | /* Begin PBXFrameworksBuildPhase section */ 134 | 89405B441DE4963A0098D1DC /* Frameworks */ = { 135 | isa = PBXFrameworksBuildPhase; 136 | buildActionMask = 2147483647; 137 | files = ( 138 | ); 139 | runOnlyForDeploymentPostprocessing = 0; 140 | }; 141 | 89405B5D1DE4963A0098D1DC /* Frameworks */ = { 142 | isa = PBXFrameworksBuildPhase; 143 | buildActionMask = 2147483647; 144 | files = ( 145 | ); 146 | runOnlyForDeploymentPostprocessing = 0; 147 | }; 148 | 89405B681DE4963A0098D1DC /* Frameworks */ = { 149 | isa = PBXFrameworksBuildPhase; 150 | buildActionMask = 2147483647; 151 | files = ( 152 | ); 153 | runOnlyForDeploymentPostprocessing = 0; 154 | }; 155 | /* End PBXFrameworksBuildPhase section */ 156 | 157 | /* Begin PBXGroup section */ 158 | 89405B3E1DE4963A0098D1DC = { 159 | isa = PBXGroup; 160 | children = ( 161 | 89405B491DE4963A0098D1DC /* JiKeScrollView */, 162 | 89405B631DE4963A0098D1DC /* JiKeScrollViewTests */, 163 | 89405B6E1DE4963A0098D1DC /* JiKeScrollViewUITests */, 164 | 89405B481DE4963A0098D1DC /* Products */, 165 | ); 166 | sourceTree = ""; 167 | }; 168 | 89405B481DE4963A0098D1DC /* Products */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 89405B471DE4963A0098D1DC /* JiKeScrollView.app */, 172 | 89405B601DE4963A0098D1DC /* JiKeScrollViewTests.xctest */, 173 | 89405B6B1DE4963A0098D1DC /* JiKeScrollViewUITests.xctest */, 174 | ); 175 | name = Products; 176 | sourceTree = ""; 177 | }; 178 | 89405B491DE4963A0098D1DC /* JiKeScrollView */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | 89F269381DE7306C000495EF /* JiKeScrollShow */, 182 | 89A724A31DE6F54B00D01DD1 /* MainVC */, 183 | 89405B7E1DE496560098D1DC /* Sources */, 184 | 89405BA51DE496630098D1DC /* Others */, 185 | 89405B4A1DE4963A0098D1DC /* Supporting Files */, 186 | ); 187 | path = JiKeScrollView; 188 | sourceTree = ""; 189 | }; 190 | 89405B4A1DE4963A0098D1DC /* Supporting Files */ = { 191 | isa = PBXGroup; 192 | children = ( 193 | 89405B4B1DE4963A0098D1DC /* main.m */, 194 | ); 195 | name = "Supporting Files"; 196 | sourceTree = ""; 197 | }; 198 | 89405B631DE4963A0098D1DC /* JiKeScrollViewTests */ = { 199 | isa = PBXGroup; 200 | children = ( 201 | 89405B641DE4963A0098D1DC /* JiKeScrollViewTests.m */, 202 | 89405B661DE4963A0098D1DC /* Info.plist */, 203 | ); 204 | path = JiKeScrollViewTests; 205 | sourceTree = ""; 206 | }; 207 | 89405B6E1DE4963A0098D1DC /* JiKeScrollViewUITests */ = { 208 | isa = PBXGroup; 209 | children = ( 210 | 89405B6F1DE4963A0098D1DC /* JiKeScrollViewUITests.m */, 211 | 89405B711DE4963A0098D1DC /* Info.plist */, 212 | ); 213 | path = JiKeScrollViewUITests; 214 | sourceTree = ""; 215 | }; 216 | 89405B7E1DE496560098D1DC /* Sources */ = { 217 | isa = PBXGroup; 218 | children = ( 219 | 89159B7F1DE719CF007411CB /* background@2x.png */, 220 | 89159B801DE719CF007411CB /* background@3x.png */, 221 | 89A108921DE5920A00C4066F /* LxDBAnything.h */, 222 | 89A108721DE536B600C4066F /* 0.png */, 223 | 89405B7F1DE496560098D1DC /* 1.png */, 224 | 89405B801DE496560098D1DC /* 10.png */, 225 | 89405B811DE496560098D1DC /* 11.png */, 226 | 89405B821DE496560098D1DC /* 12.png */, 227 | 89405B831DE496560098D1DC /* 13.png */, 228 | 89405B841DE496560098D1DC /* 14.png */, 229 | 89405B851DE496560098D1DC /* 15.png */, 230 | 89405B861DE496560098D1DC /* 16.png */, 231 | 89A108741DE5377600C4066F /* 17.png */, 232 | 89405B871DE496560098D1DC /* 18.png */, 233 | 89405B881DE496560098D1DC /* 2.png */, 234 | 89405B891DE496560098D1DC /* 3.png */, 235 | 89405B8A1DE496560098D1DC /* 4.png */, 236 | 89405B8B1DE496560098D1DC /* 5.png */, 237 | 89405B8C1DE496560098D1DC /* 6.png */, 238 | 89405B8D1DE496560098D1DC /* 7.png */, 239 | 89405B8E1DE496560098D1DC /* 8.png */, 240 | 89405B8F1DE496560098D1DC /* 9.png */, 241 | 89405B901DE496560098D1DC /* Cionfig.h */, 242 | 89159B831DE7255F007411CB /* LLTool.h */, 243 | 89159B841DE7255F007411CB /* LLTool.m */, 244 | 89405B911DE496560098D1DC /* UIView+Frame.h */, 245 | 89405B921DE496560098D1DC /* UIView+Frame.m */, 246 | ); 247 | path = Sources; 248 | sourceTree = ""; 249 | }; 250 | 89405BA51DE496630098D1DC /* Others */ = { 251 | isa = PBXGroup; 252 | children = ( 253 | 89405B4D1DE4963A0098D1DC /* AppDelegate.h */, 254 | 89405B4E1DE4963A0098D1DC /* AppDelegate.m */, 255 | 89405B531DE4963A0098D1DC /* Main.storyboard */, 256 | 89405B561DE4963A0098D1DC /* Assets.xcassets */, 257 | 89405B581DE4963A0098D1DC /* LaunchScreen.storyboard */, 258 | 89405B5B1DE4963A0098D1DC /* Info.plist */, 259 | ); 260 | name = Others; 261 | sourceTree = ""; 262 | }; 263 | 89A724A31DE6F54B00D01DD1 /* MainVC */ = { 264 | isa = PBXGroup; 265 | children = ( 266 | 89A724A41DE6F5D700D01DD1 /* JiKeScrollViewVC.h */, 267 | 89A724A51DE6F5D700D01DD1 /* JiKeScrollViewVC.m */, 268 | 89159B8A1DE72A56007411CB /* JiKeScrollImageViewVC.h */, 269 | 89159B8B1DE72A56007411CB /* JiKeScrollImageViewVC.m */, 270 | 89159B8C1DE72A56007411CB /* JiKeScrollImageViewVC.xib */, 271 | 89159B8F1DE72A90007411CB /* JiKeScrollLabelVC.h */, 272 | 89159B901DE72A90007411CB /* JiKeScrollLabelVC.m */, 273 | 89159B911DE72A90007411CB /* JiKeScrollLabelVC.xib */, 274 | 89A724A01DE6EF3700D01DD1 /* HomeTableViewController.h */, 275 | 89A724A11DE6EF3700D01DD1 /* HomeTableViewController.m */, 276 | ); 277 | name = MainVC; 278 | sourceTree = ""; 279 | }; 280 | 89F269381DE7306C000495EF /* JiKeScrollShow */ = { 281 | isa = PBXGroup; 282 | children = ( 283 | 89F269391DE7306C000495EF /* JiKeAnimationStatus.h */, 284 | 89F2693A1DE7306C000495EF /* JiKeScrollImageView.h */, 285 | 89F2693B1DE7306C000495EF /* JiKeScrollImageView.m */, 286 | 89F2693C1DE7306C000495EF /* JiKeScrollLabel.h */, 287 | 89F2693D1DE7306C000495EF /* JiKeScrollLabel.m */, 288 | 89F269401DE7306C000495EF /* JiKeSignalScrollView.h */, 289 | 89F269411DE7306C000495EF /* JiKeSignalScrollView.m */, 290 | 89F2693E1DE7306C000495EF /* JiKeScrollView.h */, 291 | 89F2693F1DE7306C000495EF /* JiKeScrollView.m */, 292 | 89F269481DE730C5000495EF /* tempBack.png */, 293 | ); 294 | name = JiKeScrollShow; 295 | path = ../../JiKeScrollShow; 296 | sourceTree = ""; 297 | }; 298 | /* End PBXGroup section */ 299 | 300 | /* Begin PBXNativeTarget section */ 301 | 89405B461DE4963A0098D1DC /* JiKeScrollView */ = { 302 | isa = PBXNativeTarget; 303 | buildConfigurationList = 89405B741DE4963A0098D1DC /* Build configuration list for PBXNativeTarget "JiKeScrollView" */; 304 | buildPhases = ( 305 | 89405B431DE4963A0098D1DC /* Sources */, 306 | 89405B441DE4963A0098D1DC /* Frameworks */, 307 | 89405B451DE4963A0098D1DC /* Resources */, 308 | ); 309 | buildRules = ( 310 | ); 311 | dependencies = ( 312 | ); 313 | name = JiKeScrollView; 314 | productName = JiKeScrollView; 315 | productReference = 89405B471DE4963A0098D1DC /* JiKeScrollView.app */; 316 | productType = "com.apple.product-type.application"; 317 | }; 318 | 89405B5F1DE4963A0098D1DC /* JiKeScrollViewTests */ = { 319 | isa = PBXNativeTarget; 320 | buildConfigurationList = 89405B771DE4963A0098D1DC /* Build configuration list for PBXNativeTarget "JiKeScrollViewTests" */; 321 | buildPhases = ( 322 | 89405B5C1DE4963A0098D1DC /* Sources */, 323 | 89405B5D1DE4963A0098D1DC /* Frameworks */, 324 | 89405B5E1DE4963A0098D1DC /* Resources */, 325 | ); 326 | buildRules = ( 327 | ); 328 | dependencies = ( 329 | 89405B621DE4963A0098D1DC /* PBXTargetDependency */, 330 | ); 331 | name = JiKeScrollViewTests; 332 | productName = JiKeScrollViewTests; 333 | productReference = 89405B601DE4963A0098D1DC /* JiKeScrollViewTests.xctest */; 334 | productType = "com.apple.product-type.bundle.unit-test"; 335 | }; 336 | 89405B6A1DE4963A0098D1DC /* JiKeScrollViewUITests */ = { 337 | isa = PBXNativeTarget; 338 | buildConfigurationList = 89405B7A1DE4963A0098D1DC /* Build configuration list for PBXNativeTarget "JiKeScrollViewUITests" */; 339 | buildPhases = ( 340 | 89405B671DE4963A0098D1DC /* Sources */, 341 | 89405B681DE4963A0098D1DC /* Frameworks */, 342 | 89405B691DE4963A0098D1DC /* Resources */, 343 | ); 344 | buildRules = ( 345 | ); 346 | dependencies = ( 347 | 89405B6D1DE4963A0098D1DC /* PBXTargetDependency */, 348 | ); 349 | name = JiKeScrollViewUITests; 350 | productName = JiKeScrollViewUITests; 351 | productReference = 89405B6B1DE4963A0098D1DC /* JiKeScrollViewUITests.xctest */; 352 | productType = "com.apple.product-type.bundle.ui-testing"; 353 | }; 354 | /* End PBXNativeTarget section */ 355 | 356 | /* Begin PBXProject section */ 357 | 89405B3F1DE4963A0098D1DC /* Project object */ = { 358 | isa = PBXProject; 359 | attributes = { 360 | LastUpgradeCheck = 0810; 361 | ORGANIZATIONNAME = "李龙"; 362 | TargetAttributes = { 363 | 89405B461DE4963A0098D1DC = { 364 | CreatedOnToolsVersion = 8.1; 365 | DevelopmentTeam = ZHR3SCPQ6E; 366 | ProvisioningStyle = Automatic; 367 | }; 368 | 89405B5F1DE4963A0098D1DC = { 369 | CreatedOnToolsVersion = 8.1; 370 | ProvisioningStyle = Automatic; 371 | TestTargetID = 89405B461DE4963A0098D1DC; 372 | }; 373 | 89405B6A1DE4963A0098D1DC = { 374 | CreatedOnToolsVersion = 8.1; 375 | ProvisioningStyle = Automatic; 376 | TestTargetID = 89405B461DE4963A0098D1DC; 377 | }; 378 | }; 379 | }; 380 | buildConfigurationList = 89405B421DE4963A0098D1DC /* Build configuration list for PBXProject "JiKeScrollView" */; 381 | compatibilityVersion = "Xcode 3.2"; 382 | developmentRegion = English; 383 | hasScannedForEncodings = 0; 384 | knownRegions = ( 385 | en, 386 | Base, 387 | ); 388 | mainGroup = 89405B3E1DE4963A0098D1DC; 389 | productRefGroup = 89405B481DE4963A0098D1DC /* Products */; 390 | projectDirPath = ""; 391 | projectRoot = ""; 392 | targets = ( 393 | 89405B461DE4963A0098D1DC /* JiKeScrollView */, 394 | 89405B5F1DE4963A0098D1DC /* JiKeScrollViewTests */, 395 | 89405B6A1DE4963A0098D1DC /* JiKeScrollViewUITests */, 396 | ); 397 | }; 398 | /* End PBXProject section */ 399 | 400 | /* Begin PBXResourcesBuildPhase section */ 401 | 89405B451DE4963A0098D1DC /* Resources */ = { 402 | isa = PBXResourcesBuildPhase; 403 | buildActionMask = 2147483647; 404 | files = ( 405 | 89405B9C1DE496560098D1DC /* 2.png in Resources */, 406 | 89159B8E1DE72A56007411CB /* JiKeScrollImageViewVC.xib in Resources */, 407 | 89405B941DE496560098D1DC /* 10.png in Resources */, 408 | 89405B981DE496560098D1DC /* 14.png in Resources */, 409 | 89405B9E1DE496560098D1DC /* 4.png in Resources */, 410 | 89A108731DE536B600C4066F /* 0.png in Resources */, 411 | 89405B951DE496560098D1DC /* 11.png in Resources */, 412 | 89405B961DE496560098D1DC /* 12.png in Resources */, 413 | 89159B821DE719CF007411CB /* background@3x.png in Resources */, 414 | 89159B931DE72A90007411CB /* JiKeScrollLabelVC.xib in Resources */, 415 | 89405BA01DE496560098D1DC /* 6.png in Resources */, 416 | 89405BA21DE496560098D1DC /* 8.png in Resources */, 417 | 89405B9D1DE496560098D1DC /* 3.png in Resources */, 418 | 89405B5A1DE4963A0098D1DC /* LaunchScreen.storyboard in Resources */, 419 | 89405BA11DE496560098D1DC /* 7.png in Resources */, 420 | 89405B991DE496560098D1DC /* 15.png in Resources */, 421 | 89405B9B1DE496560098D1DC /* 18.png in Resources */, 422 | 89405BA31DE496560098D1DC /* 9.png in Resources */, 423 | 89A108751DE5377600C4066F /* 17.png in Resources */, 424 | 89405B931DE496560098D1DC /* 1.png in Resources */, 425 | 89405B9A1DE496560098D1DC /* 16.png in Resources */, 426 | 89405B971DE496560098D1DC /* 13.png in Resources */, 427 | 89405B9F1DE496560098D1DC /* 5.png in Resources */, 428 | 89405B571DE4963A0098D1DC /* Assets.xcassets in Resources */, 429 | 89159B811DE719CF007411CB /* background@2x.png in Resources */, 430 | 89405B551DE4963A0098D1DC /* Main.storyboard in Resources */, 431 | ); 432 | runOnlyForDeploymentPostprocessing = 0; 433 | }; 434 | 89405B5E1DE4963A0098D1DC /* Resources */ = { 435 | isa = PBXResourcesBuildPhase; 436 | buildActionMask = 2147483647; 437 | files = ( 438 | ); 439 | runOnlyForDeploymentPostprocessing = 0; 440 | }; 441 | 89405B691DE4963A0098D1DC /* Resources */ = { 442 | isa = PBXResourcesBuildPhase; 443 | buildActionMask = 2147483647; 444 | files = ( 445 | ); 446 | runOnlyForDeploymentPostprocessing = 0; 447 | }; 448 | /* End PBXResourcesBuildPhase section */ 449 | 450 | /* Begin PBXSourcesBuildPhase section */ 451 | 89405B431DE4963A0098D1DC /* Sources */ = { 452 | isa = PBXSourcesBuildPhase; 453 | buildActionMask = 2147483647; 454 | files = ( 455 | 89159B921DE72A90007411CB /* JiKeScrollLabelVC.m in Sources */, 456 | 89F269451DE7306C000495EF /* JiKeScrollView.m in Sources */, 457 | 89F269431DE7306C000495EF /* JiKeScrollImageView.m in Sources */, 458 | 89405BA41DE496560098D1DC /* UIView+Frame.m in Sources */, 459 | 89F269461DE7306C000495EF /* JiKeSignalScrollView.m in Sources */, 460 | 89A724A61DE6F5D700D01DD1 /* JiKeScrollViewVC.m in Sources */, 461 | 89159B851DE7255F007411CB /* LLTool.m in Sources */, 462 | 89A724A21DE6EF3700D01DD1 /* HomeTableViewController.m in Sources */, 463 | 89F269441DE7306C000495EF /* JiKeScrollLabel.m in Sources */, 464 | 89405B4F1DE4963A0098D1DC /* AppDelegate.m in Sources */, 465 | 89405B4C1DE4963A0098D1DC /* main.m in Sources */, 466 | 89159B8D1DE72A56007411CB /* JiKeScrollImageViewVC.m in Sources */, 467 | ); 468 | runOnlyForDeploymentPostprocessing = 0; 469 | }; 470 | 89405B5C1DE4963A0098D1DC /* Sources */ = { 471 | isa = PBXSourcesBuildPhase; 472 | buildActionMask = 2147483647; 473 | files = ( 474 | 89405B651DE4963A0098D1DC /* JiKeScrollViewTests.m in Sources */, 475 | ); 476 | runOnlyForDeploymentPostprocessing = 0; 477 | }; 478 | 89405B671DE4963A0098D1DC /* Sources */ = { 479 | isa = PBXSourcesBuildPhase; 480 | buildActionMask = 2147483647; 481 | files = ( 482 | 89405B701DE4963A0098D1DC /* JiKeScrollViewUITests.m in Sources */, 483 | ); 484 | runOnlyForDeploymentPostprocessing = 0; 485 | }; 486 | /* End PBXSourcesBuildPhase section */ 487 | 488 | /* Begin PBXTargetDependency section */ 489 | 89405B621DE4963A0098D1DC /* PBXTargetDependency */ = { 490 | isa = PBXTargetDependency; 491 | target = 89405B461DE4963A0098D1DC /* JiKeScrollView */; 492 | targetProxy = 89405B611DE4963A0098D1DC /* PBXContainerItemProxy */; 493 | }; 494 | 89405B6D1DE4963A0098D1DC /* PBXTargetDependency */ = { 495 | isa = PBXTargetDependency; 496 | target = 89405B461DE4963A0098D1DC /* JiKeScrollView */; 497 | targetProxy = 89405B6C1DE4963A0098D1DC /* PBXContainerItemProxy */; 498 | }; 499 | /* End PBXTargetDependency section */ 500 | 501 | /* Begin PBXVariantGroup section */ 502 | 89405B531DE4963A0098D1DC /* Main.storyboard */ = { 503 | isa = PBXVariantGroup; 504 | children = ( 505 | 89405B541DE4963A0098D1DC /* Base */, 506 | ); 507 | name = Main.storyboard; 508 | sourceTree = ""; 509 | }; 510 | 89405B581DE4963A0098D1DC /* LaunchScreen.storyboard */ = { 511 | isa = PBXVariantGroup; 512 | children = ( 513 | 89405B591DE4963A0098D1DC /* Base */, 514 | ); 515 | name = LaunchScreen.storyboard; 516 | sourceTree = ""; 517 | }; 518 | /* End PBXVariantGroup section */ 519 | 520 | /* Begin XCBuildConfiguration section */ 521 | 89405B721DE4963A0098D1DC /* Debug */ = { 522 | isa = XCBuildConfiguration; 523 | buildSettings = { 524 | ALWAYS_SEARCH_USER_PATHS = NO; 525 | CLANG_ANALYZER_NONNULL = YES; 526 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 527 | CLANG_CXX_LIBRARY = "libc++"; 528 | CLANG_ENABLE_MODULES = YES; 529 | CLANG_ENABLE_OBJC_ARC = YES; 530 | CLANG_WARN_BOOL_CONVERSION = YES; 531 | CLANG_WARN_CONSTANT_CONVERSION = YES; 532 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 533 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 534 | CLANG_WARN_EMPTY_BODY = YES; 535 | CLANG_WARN_ENUM_CONVERSION = YES; 536 | CLANG_WARN_INFINITE_RECURSION = YES; 537 | CLANG_WARN_INT_CONVERSION = YES; 538 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 539 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 540 | CLANG_WARN_UNREACHABLE_CODE = YES; 541 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 542 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 543 | COPY_PHASE_STRIP = NO; 544 | DEBUG_INFORMATION_FORMAT = dwarf; 545 | ENABLE_STRICT_OBJC_MSGSEND = YES; 546 | ENABLE_TESTABILITY = YES; 547 | GCC_C_LANGUAGE_STANDARD = gnu99; 548 | GCC_DYNAMIC_NO_PIC = NO; 549 | GCC_NO_COMMON_BLOCKS = YES; 550 | GCC_OPTIMIZATION_LEVEL = 0; 551 | GCC_PREPROCESSOR_DEFINITIONS = ( 552 | "DEBUG=1", 553 | "$(inherited)", 554 | ); 555 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 556 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 557 | GCC_WARN_UNDECLARED_SELECTOR = YES; 558 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 559 | GCC_WARN_UNUSED_FUNCTION = YES; 560 | GCC_WARN_UNUSED_VARIABLE = YES; 561 | IPHONEOS_DEPLOYMENT_TARGET = 10.1; 562 | MTL_ENABLE_DEBUG_INFO = YES; 563 | ONLY_ACTIVE_ARCH = YES; 564 | SDKROOT = iphoneos; 565 | }; 566 | name = Debug; 567 | }; 568 | 89405B731DE4963A0098D1DC /* Release */ = { 569 | isa = XCBuildConfiguration; 570 | buildSettings = { 571 | ALWAYS_SEARCH_USER_PATHS = NO; 572 | CLANG_ANALYZER_NONNULL = YES; 573 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 574 | CLANG_CXX_LIBRARY = "libc++"; 575 | CLANG_ENABLE_MODULES = YES; 576 | CLANG_ENABLE_OBJC_ARC = YES; 577 | CLANG_WARN_BOOL_CONVERSION = YES; 578 | CLANG_WARN_CONSTANT_CONVERSION = YES; 579 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 580 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 581 | CLANG_WARN_EMPTY_BODY = YES; 582 | CLANG_WARN_ENUM_CONVERSION = YES; 583 | CLANG_WARN_INFINITE_RECURSION = YES; 584 | CLANG_WARN_INT_CONVERSION = YES; 585 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 586 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 587 | CLANG_WARN_UNREACHABLE_CODE = YES; 588 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 589 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 590 | COPY_PHASE_STRIP = NO; 591 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 592 | ENABLE_NS_ASSERTIONS = NO; 593 | ENABLE_STRICT_OBJC_MSGSEND = YES; 594 | GCC_C_LANGUAGE_STANDARD = gnu99; 595 | GCC_NO_COMMON_BLOCKS = YES; 596 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 597 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 598 | GCC_WARN_UNDECLARED_SELECTOR = YES; 599 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 600 | GCC_WARN_UNUSED_FUNCTION = YES; 601 | GCC_WARN_UNUSED_VARIABLE = YES; 602 | IPHONEOS_DEPLOYMENT_TARGET = 10.1; 603 | MTL_ENABLE_DEBUG_INFO = NO; 604 | SDKROOT = iphoneos; 605 | VALIDATE_PRODUCT = YES; 606 | }; 607 | name = Release; 608 | }; 609 | 89405B751DE4963A0098D1DC /* Debug */ = { 610 | isa = XCBuildConfiguration; 611 | buildSettings = { 612 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 613 | DEVELOPMENT_TEAM = ZHR3SCPQ6E; 614 | INFOPLIST_FILE = JiKeScrollView/Info.plist; 615 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 616 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 617 | PRODUCT_BUNDLE_IDENTIFIER = com.lauren.JiKeScrollView; 618 | PRODUCT_NAME = "$(TARGET_NAME)"; 619 | }; 620 | name = Debug; 621 | }; 622 | 89405B761DE4963A0098D1DC /* Release */ = { 623 | isa = XCBuildConfiguration; 624 | buildSettings = { 625 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 626 | DEVELOPMENT_TEAM = ZHR3SCPQ6E; 627 | INFOPLIST_FILE = JiKeScrollView/Info.plist; 628 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 629 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 630 | PRODUCT_BUNDLE_IDENTIFIER = com.lauren.JiKeScrollView; 631 | PRODUCT_NAME = "$(TARGET_NAME)"; 632 | }; 633 | name = Release; 634 | }; 635 | 89405B781DE4963A0098D1DC /* Debug */ = { 636 | isa = XCBuildConfiguration; 637 | buildSettings = { 638 | BUNDLE_LOADER = "$(TEST_HOST)"; 639 | INFOPLIST_FILE = JiKeScrollViewTests/Info.plist; 640 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 641 | PRODUCT_BUNDLE_IDENTIFIER = com.lauren.JiKeScrollViewTests; 642 | PRODUCT_NAME = "$(TARGET_NAME)"; 643 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/JiKeScrollView.app/JiKeScrollView"; 644 | }; 645 | name = Debug; 646 | }; 647 | 89405B791DE4963A0098D1DC /* Release */ = { 648 | isa = XCBuildConfiguration; 649 | buildSettings = { 650 | BUNDLE_LOADER = "$(TEST_HOST)"; 651 | INFOPLIST_FILE = JiKeScrollViewTests/Info.plist; 652 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 653 | PRODUCT_BUNDLE_IDENTIFIER = com.lauren.JiKeScrollViewTests; 654 | PRODUCT_NAME = "$(TARGET_NAME)"; 655 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/JiKeScrollView.app/JiKeScrollView"; 656 | }; 657 | name = Release; 658 | }; 659 | 89405B7B1DE4963A0098D1DC /* Debug */ = { 660 | isa = XCBuildConfiguration; 661 | buildSettings = { 662 | INFOPLIST_FILE = JiKeScrollViewUITests/Info.plist; 663 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 664 | PRODUCT_BUNDLE_IDENTIFIER = com.lauren.JiKeScrollViewUITests; 665 | PRODUCT_NAME = "$(TARGET_NAME)"; 666 | TEST_TARGET_NAME = JiKeScrollView; 667 | }; 668 | name = Debug; 669 | }; 670 | 89405B7C1DE4963A0098D1DC /* Release */ = { 671 | isa = XCBuildConfiguration; 672 | buildSettings = { 673 | INFOPLIST_FILE = JiKeScrollViewUITests/Info.plist; 674 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 675 | PRODUCT_BUNDLE_IDENTIFIER = com.lauren.JiKeScrollViewUITests; 676 | PRODUCT_NAME = "$(TARGET_NAME)"; 677 | TEST_TARGET_NAME = JiKeScrollView; 678 | }; 679 | name = Release; 680 | }; 681 | /* End XCBuildConfiguration section */ 682 | 683 | /* Begin XCConfigurationList section */ 684 | 89405B421DE4963A0098D1DC /* Build configuration list for PBXProject "JiKeScrollView" */ = { 685 | isa = XCConfigurationList; 686 | buildConfigurations = ( 687 | 89405B721DE4963A0098D1DC /* Debug */, 688 | 89405B731DE4963A0098D1DC /* Release */, 689 | ); 690 | defaultConfigurationIsVisible = 0; 691 | defaultConfigurationName = Release; 692 | }; 693 | 89405B741DE4963A0098D1DC /* Build configuration list for PBXNativeTarget "JiKeScrollView" */ = { 694 | isa = XCConfigurationList; 695 | buildConfigurations = ( 696 | 89405B751DE4963A0098D1DC /* Debug */, 697 | 89405B761DE4963A0098D1DC /* Release */, 698 | ); 699 | defaultConfigurationIsVisible = 0; 700 | defaultConfigurationName = Release; 701 | }; 702 | 89405B771DE4963A0098D1DC /* Build configuration list for PBXNativeTarget "JiKeScrollViewTests" */ = { 703 | isa = XCConfigurationList; 704 | buildConfigurations = ( 705 | 89405B781DE4963A0098D1DC /* Debug */, 706 | 89405B791DE4963A0098D1DC /* Release */, 707 | ); 708 | defaultConfigurationIsVisible = 0; 709 | defaultConfigurationName = Release; 710 | }; 711 | 89405B7A1DE4963A0098D1DC /* Build configuration list for PBXNativeTarget "JiKeScrollViewUITests" */ = { 712 | isa = XCConfigurationList; 713 | buildConfigurations = ( 714 | 89405B7B1DE4963A0098D1DC /* Debug */, 715 | 89405B7C1DE4963A0098D1DC /* Release */, 716 | ); 717 | defaultConfigurationIsVisible = 0; 718 | defaultConfigurationName = Release; 719 | }; 720 | /* End XCConfigurationList section */ 721 | }; 722 | rootObject = 89405B3F1DE4963A0098D1DC /* Project object */; 723 | } 724 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/22. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/22. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Assets.xcassets/background-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "scale" : "3x" 14 | } 15 | ], 16 | "info" : { 17 | "version" : 1, 18 | "author" : "xcode" 19 | } 20 | } -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 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 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/HomeTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HomeTableViewController.h 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/24. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HomeTableViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/HomeTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HomeTableViewController.m 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/24. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import "HomeTableViewController.h" 10 | #import "JiKeScrollViewVC.h" 11 | #import "JiKeScrollImageViewVC.h" 12 | #import "JiKeScrollLabelVC.h" 13 | 14 | @interface HomeTableViewController () 15 | 16 | @property (nonatomic,strong) NSArray *titleArray; 17 | @property (nonatomic,strong) NSArray *pushVCNameArray; 18 | 19 | @end 20 | 21 | @implementation HomeTableViewController 22 | 23 | static NSString *cellFlag= @"cell"; 24 | 25 | - (void)viewDidLoad { 26 | [super viewDidLoad]; 27 | 28 | _titleArray = [NSArray arrayWithObjects:@"即刻首页滚动效果",@"JikeImageView滚动效果",@"JikeScrollLabel滚动效果", nil]; 29 | _pushVCNameArray = [NSArray arrayWithObjects:@"JiKeScrollViewVC",@"JiKeScrollImageViewVC",@"JiKeScrollLabelVC", nil]; 30 | 31 | [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:cellFlag]; 32 | self.tableView.tableFooterView = [UIView new]; 33 | } 34 | 35 | - (void)didReceiveMemoryWarning { 36 | [super didReceiveMemoryWarning]; 37 | // Dispose of any resources that can be recreated. 38 | } 39 | 40 | #pragma mark - Table view data source 41 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 42 | return 3; 43 | } 44 | 45 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 46 | 47 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellFlag forIndexPath:indexPath]; 48 | 49 | cell.textLabel.font = [UIFont systemFontOfSize:15]; 50 | cell.textLabel.text = [_titleArray[indexPath.row] stringByAppendingString:@" - 手势返回"]; 51 | return cell; 52 | } 53 | 54 | 55 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 56 | [self pushToVC:_pushVCNameArray[indexPath.row]]; 57 | } 58 | 59 | 60 | - (void)pushToVC:(NSString *)vcName{ 61 | Class someClass = NSClassFromString(vcName); 62 | id obj = [[someClass alloc] init]; 63 | [self.navigationController pushViewController:obj animated:YES]; 64 | } 65 | 66 | 67 | @end 68 | 69 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/JiKeScrollImageViewVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // JiKeScrollImageViewVC.h 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/24. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JiKeScrollImageViewVC : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/JiKeScrollImageViewVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // JiKeScrollImageViewVC.m 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/24. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import "JiKeScrollImageViewVC.h" 10 | #import "JiKeScrollImageView.h" 11 | #import "Cionfig.h" 12 | 13 | 14 | @interface JiKeScrollImageViewVC () 15 | 16 | @property (nonatomic,strong) JiKeScrollImageView *myJiKeScrollImageView; 17 | @property (nonatomic,strong) NSArray *tempDataArray; 18 | 19 | @end 20 | 21 | @implementation JiKeScrollImageViewVC 22 | { 23 | int dataShowIndex; 24 | 25 | } 26 | 27 | - (NSArray *)tempDataArray 28 | { 29 | if (!_tempDataArray) { 30 | _tempDataArray = @[ 31 | @"1",@"2",@"3", 32 | @"4",@"5",@"6", 33 | @"7",@"8",@"9", 34 | @"10",@"11",@"12", 35 | @"13",@"14",@"15", 36 | @"16",@"17",@"18" 37 | ]; 38 | } 39 | return _tempDataArray; 40 | } 41 | 42 | 43 | - (void)viewDidLoad { 44 | [super viewDidLoad]; 45 | 46 | self.view.backgroundColor = [UIColor whiteColor]; 47 | self.navigationController.navigationBar.alpha = 1; 48 | 49 | 50 | //滚动图 51 | _myJiKeScrollImageView = ({ 52 | JiKeScrollImageView *scrollImageView = [[JiKeScrollImageView alloc] initWithFrame:(CGRect){(LLScreenWidth-100)*0.5,100,100,100}]; 53 | LxDBAnyVar(scrollImageView); 54 | [self.view addSubview:scrollImageView]; 55 | scrollImageView; 56 | }); 57 | 58 | _myJiKeScrollImageView.myFirstShowImageLinkArray = @[@"1",@"2"]; 59 | 60 | } 61 | 62 | 63 | 64 | 65 | - (IBAction)btnOnClick:(id)sender{ 66 | dataShowIndex = dataShowIndex >= self.tempDataArray.count ? 0 : dataShowIndex; 67 | _myJiKeScrollImageView.myNextShowImageLink = self.tempDataArray[dataShowIndex]; 68 | dataShowIndex++; 69 | } 70 | 71 | 72 | -(void)setMyFirstShowImageLinkArray:(NSArray *)myFirstShowImageLinkArray{ 73 | _myJiKeScrollImageView.myFirstShowImageLinkArray = myFirstShowImageLinkArray; 74 | 75 | } 76 | 77 | 78 | -(void)setMyNextShowImageLink:(NSString *)myNextShowImageLink{ 79 | _myJiKeScrollImageView.myNextShowImageLink = myNextShowImageLink; 80 | } 81 | 82 | 83 | 84 | 85 | 86 | 87 | @end 88 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/JiKeScrollImageViewVC.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/JiKeScrollLabelVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // JiKeScrollLabelVC.h 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/24. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JiKeScrollLabelVC : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/JiKeScrollLabelVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // JiKeScrollLabelVC.m 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/24. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import "JiKeScrollLabelVC.h" 10 | #import "JiKeScrollLabel.h" 11 | #import "Cionfig.h" 12 | 13 | @interface JiKeScrollLabelVC () 14 | 15 | 16 | @property (nonatomic,strong) JiKeScrollLabel *myJiKeScrollLabel; 17 | @property (nonatomic,strong) NSArray *tempDataArray; 18 | @end 19 | 20 | @implementation JiKeScrollLabelVC 21 | { 22 | int dataShowIndex; 23 | 24 | } 25 | 26 | 27 | - (NSArray *)tempDataArray 28 | { 29 | if (!_tempDataArray) { 30 | _tempDataArray = @[ 31 | @"这些微博的评论更好",@"法国电影咨询",@"果壳精选", 32 | @"被曝光刷量了",@"Vista看了天",@"FaceBook最新消息推送", 33 | @"鲍勃·迪伦",@"《神探夏洛克》第四季消息",@"我的狂怒你你驾驭不住", 34 | @"Pantone发现了新东西",@"国服新网游测试预告布了新的流行色",@"张碧池小姐分享了新表情", 35 | @"每日新闻联播头条",@"明星大V秒删微博提醒",@"每日一首提神歌曲", 36 | @"老司机带带我",@"\"人人都是产品经理\"精华文章",@"时令水果上市提醒" 37 | ]; 38 | } 39 | return _tempDataArray; 40 | } 41 | 42 | 43 | 44 | - (void)viewDidLoad { 45 | [super viewDidLoad]; 46 | 47 | self.view.backgroundColor = [UIColor whiteColor]; 48 | self.navigationController.navigationBar.alpha = 1; 49 | 50 | CGSize labelSize = [LLTool getSizeWithStrig:@"测试" font:LLLabelFont maxSize:(CGSize){100,MAXFLOAT}]; 51 | 52 | //滚动文字 53 | _myJiKeScrollLabel = ({ 54 | CGFloat scrollLabelY = 100; 55 | JiKeScrollLabel *scrollLabel = [[JiKeScrollLabel alloc] initWithFrame:(CGRect){(LLScreenWidth-100)*0.5,scrollLabelY,100,labelSize.height*2}]; 56 | scrollLabel.layer.borderWidth = 1; 57 | [self.view addSubview:scrollLabel]; 58 | scrollLabel; 59 | }); 60 | 61 | 62 | _myJiKeScrollLabel.myFirstShowLabelDesArray = @[@"首测数据一",@"首测数据二"]; 63 | } 64 | 65 | 66 | 67 | 68 | - (IBAction)btnOnClick:(id)sender{ 69 | 70 | dataShowIndex = dataShowIndex >= self.tempDataArray.count ? 0 : dataShowIndex; 71 | _myJiKeScrollLabel.myNextShowLabelDes = self.tempDataArray[dataShowIndex]; 72 | dataShowIndex++; 73 | } 74 | 75 | 76 | 77 | //初始化数据 78 | -(void)setMyFirstShowLabelDesArray:(NSArray *)myFirstShowLabelDesArray{ 79 | _myJiKeScrollLabel.myFirstShowLabelDesArray = myFirstShowLabelDesArray; 80 | } 81 | 82 | //执行下一次显示动画 83 | -(void)setMyNextShowLabelDes:(NSString *)myNextShowLabelDes{ 84 | _myJiKeScrollLabel.myNextShowLabelDes = myNextShowLabelDes; 85 | } 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | @end 94 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/JiKeScrollLabelVC.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/JiKeScrollViewVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // JiKeScrollViewVC.h 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/24. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JiKeScrollViewVC : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/JiKeScrollViewVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // JiKeScrollViewVC.m 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/24. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import "JiKeScrollViewVC.h" 10 | #import "Cionfig.h" 11 | #import "JiKeScrollView.h" 12 | 13 | @interface JiKeScrollViewVC () 14 | 15 | //模拟数据 16 | @property (nonatomic,strong) NSArray *tempImageLinkDataArray; 17 | @property (nonatomic,strong) NSArray *tempImageDesDataArray; 18 | 19 | @property (nonatomic,strong) JiKeScrollView *myJikeScrollView; 20 | 21 | @end 22 | 23 | @implementation JiKeScrollViewVC 24 | { 25 | int dataShowIndex; 26 | } 27 | 28 | 29 | 30 | - (void)viewDidLoad { 31 | 32 | [super viewDidLoad]; 33 | 34 | self.navigationController.navigationBar.alpha = 0; 35 | self.view.backgroundColor = [UIColor whiteColor]; 36 | 37 | LxDBAnyVar(LLScreenWidth); 38 | 39 | UIImageView *bkIconView = [[UIImageView alloc] initWithFrame:(CGRect){0,0,LLScreenWidth,LLScreenHeight}]; 40 | bkIconView.image = [UIImage imageNamed:@"background.png"]; 41 | [self.view addSubview:bkIconView]; 42 | 43 | //滚动图 44 | _myJikeScrollView = ({ 45 | JiKeScrollView *scrollView = [[JiKeScrollView alloc] initWithFrame:[self getScrollViewFrame]]; 46 | [self.view addSubview:scrollView]; 47 | scrollView; 48 | }); 49 | 50 | //换一换按钮 51 | UIButton *button = [[UIButton alloc] initWithFrame:[self getButtonFrame]]; 52 | [button setTitle:@"换一换" forState:UIControlStateNormal]; 53 | button.titleLabel.font = [UIFont italicSystemFontOfSize:15]; 54 | button.layer.cornerRadius = LLScreenWidth == 320 ? 15 : 20; 55 | button.layer.borderWidth = 1; 56 | [button addTarget:self action:@selector(btnOnClick) forControlEvents:UIControlEventTouchUpInside]; 57 | [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 58 | [self.view addSubview:button]; 59 | 60 | 61 | //初始化假数据 62 | _myJikeScrollView.myFirstShowImageLinkArray = @[ 63 | @[@"11",@"12"], 64 | @[@"13",@"14"], 65 | @[@"15",@"16"] 66 | ]; 67 | _myJikeScrollView.myFirstShowLabelDesArray = @[ 68 | @[@"左边初始描述文字1",@"左边初始描述文字2"], 69 | @[@"中间初始描述文字3",@"中间初始描述文字4"], 70 | @[@"右边初始描述文字5",@"右边初始描述文字6"] 71 | ]; 72 | 73 | 74 | 75 | 76 | 77 | // [NSTimer scheduledTimerWithTimeInterval:0.5f 78 | // target:self 79 | // selector:@selector(btnOnClick) 80 | // userInfo:nil 81 | // repeats:YES]; 82 | 83 | } 84 | 85 | - (void)btnOnClick { 86 | 87 | dataShowIndex = dataShowIndex >= self.tempImageLinkDataArray.count ? 0 : dataShowIndex; 88 | 89 | _myJikeScrollView.myNextShowImageLinkArray = self.tempImageLinkDataArray[dataShowIndex]; 90 | _myJikeScrollView.myNextShowLabelDesArray = self.tempImageDesDataArray[dataShowIndex]; 91 | 92 | dataShowIndex++; 93 | } 94 | 95 | 96 | - (NSArray *)tempImageDesDataArray 97 | { 98 | if (!_tempImageDesDataArray) { 99 | _tempImageDesDataArray = @[ 100 | @[@"这些微博的评论更好",@"法国电影咨询",@"果壳精选"], 101 | @[@"被曝光刷量了",@"Vista看了天",@"FaceBook最新消息推送"], 102 | @[@"鲍勃·迪伦",@"《神探夏洛克》第四季消息",@"我的狂怒你你驾驭不住"], 103 | @[@"Pantone发现了新东西",@"国服新网游测试预告布了新的流行色",@"张碧池小姐分享了新表情"], 104 | @[@"每日新闻联播头条",@"明星大V秒删微博提醒",@"每日一首提神歌曲"], 105 | @[@"老司机带带我",@"\"人人都是产品经理\"精华文章",@"时令水果上市提醒"], 106 | ]; 107 | } 108 | return _tempImageDesDataArray; 109 | } 110 | 111 | 112 | - (NSArray *)tempImageLinkDataArray 113 | { 114 | if (!_tempImageLinkDataArray) { 115 | _tempImageLinkDataArray = @[ 116 | @[@"1",@"2",@"3"], 117 | @[@"4",@"5",@"6"], 118 | @[@"7",@"8",@"9"], 119 | @[@"10",@"11",@"12"], 120 | @[@"13",@"14",@"15"], 121 | @[@"16",@"17",@"18"], 122 | ]; 123 | } 124 | return _tempImageLinkDataArray; 125 | } 126 | 127 | 128 | - (CGRect)getScrollViewFrame{ 129 | CGRect frame; 130 | if (LLScreenWidth == 320) 131 | frame = (CGRect){0,107,LLScreenWidth,151.298625}; 132 | else if (LLScreenWidth == 375) 133 | frame = (CGRect){0,125,LLScreenWidth,169.630125}; 134 | else 135 | frame = (CGRect){0,110,LLScreenWidth,182.628825}; 136 | return frame; 137 | } 138 | 139 | 140 | - (CGRect)getButtonFrame{ 141 | CGRect frame; 142 | if (LLScreenWidth == 320) 143 | frame = (CGRect){(LLScreenWidth-220)*0.5, _myJikeScrollView.bottom+10, 220, 30}; 144 | else if (LLScreenWidth == 375) 145 | frame = (CGRect){(LLScreenWidth-220)*0.5, _myJikeScrollView.bottom+20, 220, 35}; 146 | else 147 | frame = (CGRect){(LLScreenWidth-220)*0.5, _myJikeScrollView.bottom+5, 220, 35}; 148 | return frame; 149 | } 150 | 151 | @end 152 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/0.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/1.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/10.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/11.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/12.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/13.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/14.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/15.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/16.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/17.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/18.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/2.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/3.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/4.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/5.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/6.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/7.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/8.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/9.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/Cionfig.h: -------------------------------------------------------------------------------- 1 | // 2 | // Cionfig.h 3 | // JikePictureShow 4 | // 5 | // Created by 李龙 on 16/11/22. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #ifndef Cionfig_h 10 | #define Cionfig_h 11 | 12 | 13 | //重写NSLog,Debug模式下打印日志和当前行数 14 | #if DEBUG 15 | #define NSLog(FORMAT, ...) fprintf(stderr,"\nfunction:%s line:%d\n%s\n", __FUNCTION__, __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]); 16 | #else 17 | #define NSLog(FORMAT, ...) nil 18 | #endif 19 | 20 | 21 | #define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0] 22 | 23 | //DEBUG 模式下打印日志,当前行 并弹出一个警告 24 | #ifdef DEBUG 25 | # define ULog(fmt, ...) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"%s\n [Line %d] ", __PRETTY_FUNCTION__, __LINE__] message:[NSString stringWithFormat:fmt, ##__VA_ARGS__] delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [alert show]; } 26 | #else 27 | # define ULog(...) 28 | #endif 29 | 30 | 31 | 32 | 33 | #define LLScreenWidth ([[UIScreen mainScreen] bounds].size.width) 34 | #define LLScreenHeight ([[UIScreen mainScreen] bounds].size.height) 35 | 36 | #define LLLabelFont [UIFont systemFontOfSize:12] 37 | #define LLTBMargin 13 //signalScrollView顶部和底部间距 38 | #define LLLRMargin 15 //signalScrollView左右边界间距 39 | #define LLhorizontalMargin 10 //signalScrollView水平间距 40 | #define LLverticalMargin 15 //signalScrollView竖直间 41 | 42 | 43 | 44 | #import "LxDBAnything.h" 45 | #import "UIView+Frame.h" 46 | #import "LLTool.h" 47 | 48 | #endif /* Cionfig_h */ 49 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/LLTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // LLTool.h 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/24. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface LLTool : NSObject 13 | 14 | + (CGSize)getSizeWithStrig:(NSString *)text font:(UIFont *)font maxSize:(CGSize)maxSize; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/LLTool.m: -------------------------------------------------------------------------------- 1 | // 2 | // LLTool.m 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/24. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import "LLTool.h" 10 | 11 | @implementation LLTool 12 | 13 | + (CGSize)getSizeWithStrig:(NSString *)text font:(UIFont *)font maxSize:(CGSize)maxSize 14 | { 15 | NSDictionary *attrs = @{NSFontAttributeName : font}; 16 | return [text boundingRectWithSize:maxSize options:NSStringDrawingUsesLineFragmentOrigin attributes:attrs context:nil].size; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/LxDBAnything.h: -------------------------------------------------------------------------------- 1 | // 2 | // LxDBAnything.h 3 | // LxDBAnythingDemo 4 | // 5 | // Created by DeveloperLx on 15/10/24. 6 | // Copyright © 2015年 DeveloperLx. All rights reserved. 7 | // 8 | 9 | #ifndef LxDBAnything_h 10 | #define LxDBAnything_h 11 | 12 | #import 13 | #import 14 | 15 | #pragma mark ------------------------------- interface ------------------------------- 16 | 17 | #if TARGET_OS_IPHONE 18 | 19 | #define LxEdgeInsets UIEdgeInsets 20 | #define LxOffset UIOffset 21 | #define valueWithLxOffset valueWithUIOffset 22 | #define valueWithLxEdgeInsets valueWithUIEdgeInsets 23 | 24 | #elif TARGET_OS_MAC 25 | 26 | #define LxEdgeInsets NSEdgeInsets 27 | #define LxOffset NSOffset 28 | #define valueWithLxOffset valueWithNSOffset 29 | #define valueWithLxEdgeInsets valueWithNSEdgeInsets 30 | 31 | #endif 32 | 33 | #define stringify __STRING 34 | #define LxType(var) __typeof__((var)) 35 | #define LxBox(var) __lx_box(@encode(LxType(var)), (var)) 36 | #define LxBoxToString(var) [LxBox(var) description] 37 | #define LxTypeStringOfVar(var) __lx_type_string_for_var(@encode(LxType(var)), (var)) 38 | 39 | static NSDictionary * LxDictionaryFromObject(NSObject * object); 40 | static NSString * LxJsonFromObject(NSObject * object); 41 | static NSString * LxXmlFromObject(NSObject * object); 42 | static NSString * LxViewHierarchyDescription(UIView * view); 43 | 44 | #ifdef DEBUG 45 | #define LxPrintf(fmt, ...) printf("🐯🐯🐯🐯🐯%s + %d☀️☀️☀️☀️☀️☀️ %s\n", __PRETTY_FUNCTION__, __LINE__, [[NSString stringWithFormat:fmt, ##__VA_ARGS__]UTF8String]) 46 | #define LxDBAnyVar(var) LxPrintf(@"%s = %@", #var, LxBox(var)) 47 | #define LxPrintAnything(x) printf("🐯🐯🐯🐯🐯%s + %d☀️☀️☀️☀️☀️☀️ %s\n", __PRETTY_FUNCTION__, __LINE__, #x) 48 | #define LxDBObjectAsJson(obj) printf("🐯🐯🐯🐯🐯%s + %d☀️☀️☀️☀️☀️☀️ %s\n", __PRETTY_FUNCTION__, __LINE__, __lx_json_db_object_string(obj).UTF8String) 49 | #define LxDBObjectAsXml(obj) printf("🐯🐯🐯🐯🐯%s + %d☀️☀️☀️☀️☀️☀️ %s\n", __PRETTY_FUNCTION__, __LINE__, __lx_xml_db_object_string(obj).UTF8String) 50 | #define LxDBViewHierarchy(view) printf("🐯🐯🐯🐯🐯%s + %d☀️☀️☀️☀️☀️☀️%s =\n%s\n", __PRETTY_FUNCTION__, __LINE__, #view, LxViewHierarchyDescription(view).UTF8String) 51 | #else 52 | #define LxPrintf(fmt, ...) 53 | #define LxDBAnyVar(any) 54 | #define LxPrintAnything(x) 55 | #define LxDBObjectAsJson(obj) 56 | #define LxDBObjectAsXml(obj) 57 | #define LxDBViewHierarchy(view) 58 | #endif 59 | 60 | #pragma mark ------------------------------- implementation ------------------------------- 61 | 62 | static inline id __lx_box(const char * type, ...) 63 | { 64 | va_list variable_param_list; 65 | va_start(variable_param_list, type); 66 | 67 | id object = nil; 68 | 69 | if (strcmp(type, @encode(id)) == 0) { 70 | id param = va_arg(variable_param_list, id); 71 | object = param; 72 | } 73 | else if (strcmp(type, @encode(CGPoint)) == 0) { 74 | CGPoint param = (CGPoint)va_arg(variable_param_list, CGPoint); 75 | object = [NSValue valueWithCGPoint:param]; 76 | } 77 | else if (strcmp(type, @encode(CGSize)) == 0) { 78 | CGSize param = (CGSize)va_arg(variable_param_list, CGSize); 79 | object = [NSValue valueWithCGSize:param]; 80 | } 81 | else if (strcmp(type, @encode(CGVector)) == 0) { 82 | CGVector param = (CGVector)va_arg(variable_param_list, CGVector); 83 | object = [NSValue valueWithCGVector:param]; 84 | } 85 | else if (strcmp(type, @encode(CGRect)) == 0) { 86 | CGRect param = (CGRect)va_arg(variable_param_list, CGRect); 87 | object = [NSValue valueWithCGRect:param]; 88 | } 89 | else if (strcmp(type, @encode(NSRange)) == 0) { 90 | NSRange param = (NSRange)va_arg(variable_param_list, NSRange); 91 | object = [NSValue valueWithRange:param]; 92 | } 93 | else if (strcmp(type, @encode(CFRange)) == 0) { 94 | CFRange param = (CFRange)va_arg(variable_param_list, CFRange); 95 | object = [NSValue value:¶m withObjCType:type]; 96 | } 97 | else if (strcmp(type, @encode(CGAffineTransform)) == 0) { 98 | CGAffineTransform param = (CGAffineTransform)va_arg(variable_param_list, CGAffineTransform); 99 | object = [NSValue valueWithCGAffineTransform:param]; 100 | } 101 | else if (strcmp(type, @encode(CATransform3D)) == 0) { 102 | CATransform3D param = (CATransform3D)va_arg(variable_param_list, CATransform3D); 103 | object = [NSValue valueWithCATransform3D:param]; 104 | } 105 | else if (strcmp(type, @encode(SEL)) == 0) { 106 | SEL param = (SEL)va_arg(variable_param_list, SEL); 107 | object = NSStringFromSelector(param); 108 | } 109 | else if (strcmp(type, @encode(Class)) == 0) { 110 | Class param = (Class)va_arg(variable_param_list, Class); 111 | object = NSStringFromClass(param); 112 | } 113 | else if (strcmp(type, @encode(LxOffset)) == 0) { 114 | LxOffset param = (LxOffset)va_arg(variable_param_list, LxOffset); 115 | object = [NSValue valueWithLxOffset:param]; 116 | } 117 | else if (strcmp(type, @encode(LxEdgeInsets)) == 0) { 118 | LxEdgeInsets param = (LxEdgeInsets)va_arg(variable_param_list, LxEdgeInsets); 119 | object = [NSValue valueWithLxEdgeInsets:param]; 120 | } 121 | else if (strcmp(type, @encode(short)) == 0) { 122 | short param = (short)va_arg(variable_param_list, int); 123 | object = @(param); 124 | } 125 | else if (strcmp(type, @encode(int)) == 0) { 126 | int param = (int)va_arg(variable_param_list, int); 127 | object = @(param); 128 | } 129 | else if (strcmp(type, @encode(long)) == 0) { 130 | long param = (long)va_arg(variable_param_list, long); 131 | object = @(param); 132 | } 133 | else if (strcmp(type, @encode(long long)) == 0) { 134 | long long param = (long long)va_arg(variable_param_list, long long); 135 | object = @(param); 136 | } 137 | else if (strcmp(type, @encode(float)) == 0) { 138 | float param = (float)va_arg(variable_param_list, double); 139 | object = @(param); 140 | } 141 | else if (strcmp(type, @encode(double)) == 0) { 142 | double param = (double)va_arg(variable_param_list, double); 143 | object = @(param); 144 | } 145 | else if (strcmp(type, @encode(BOOL)) == 0) { 146 | BOOL param = (BOOL)va_arg(variable_param_list, int); 147 | object = param ? @"YES" : @"NO"; 148 | } 149 | else if (strcmp(type, @encode(bool)) == 0) { 150 | bool param = (bool)va_arg(variable_param_list, int); 151 | object = param ? @"true" : @"false"; 152 | } 153 | else if (strcmp(type, @encode(char)) == 0) { 154 | char param = (char)va_arg(variable_param_list, int); 155 | object = [NSString stringWithFormat:@"%c", param]; 156 | } 157 | else if (strcmp(type, @encode(unsigned short)) == 0) { 158 | unsigned short param = (unsigned short)va_arg(variable_param_list, unsigned int); 159 | object = @(param); 160 | } 161 | else if (strcmp(type, @encode(unsigned int)) == 0) { 162 | unsigned int param = (unsigned int)va_arg(variable_param_list, unsigned int); 163 | object = @(param); 164 | } 165 | else if (strcmp(type, @encode(unsigned long)) == 0) { 166 | unsigned long param = (unsigned long)va_arg(variable_param_list, unsigned long); 167 | object = @(param); 168 | } 169 | else if (strcmp(type, @encode(unsigned long long)) == 0) { 170 | unsigned long long param = (unsigned long long)va_arg(variable_param_list, unsigned long long); 171 | object = @(param); 172 | } 173 | else if (strcmp(type, @encode(unsigned char)) == 0) { 174 | unsigned char param = (unsigned char)va_arg(variable_param_list, unsigned int); 175 | object = [NSString stringWithFormat:@"%c", param]; 176 | } 177 | else { 178 | void * param = (void *)va_arg(variable_param_list, void *); 179 | object = [NSString stringWithFormat:@"%p", param]; 180 | } 181 | 182 | va_end(variable_param_list); 183 | 184 | return object; 185 | } 186 | 187 | static inline char __lx_first_char_for_string(const char * string) 188 | { 189 | if (strlen(string) > 0) { 190 | return string[0]; 191 | } 192 | else { 193 | return '\0'; 194 | } 195 | } 196 | 197 | static inline char __lx_last_char_for_string(const char * string) 198 | { 199 | if (strlen(string) > 0) { 200 | return string[strlen(string) - 1]; 201 | } 202 | else { 203 | return '\0'; 204 | } 205 | } 206 | 207 | static inline NSString * __lx_type_string_for_var(const char * type, ...) 208 | { 209 | va_list variable_param_list; 210 | va_start(variable_param_list, type); 211 | 212 | NSString * typeString = nil; 213 | 214 | if (strcmp(type, @encode(id)) == 0) { 215 | 216 | id param = va_arg(variable_param_list, id); 217 | typeString = NSStringFromClass([param class]); 218 | } 219 | else if (strcmp(type, @encode(CGPoint)) == 0) { 220 | 221 | typeString = @stringify(CGPoint); 222 | } 223 | else if (strcmp(type, @encode(CGSize)) == 0) { 224 | 225 | typeString = @stringify(CGSize); 226 | } 227 | else if (strcmp(type, @encode(CGVector)) == 0) { 228 | 229 | typeString = @stringify(CGVector); 230 | } 231 | else if (strcmp(type, @encode(CGRect)) == 0) { 232 | 233 | typeString = @stringify(CGRect); 234 | } 235 | else if (strcmp(type, @encode(NSRange)) == 0) { 236 | 237 | typeString = @stringify(NSRange); 238 | } 239 | else if (strcmp(type, @encode(CFRange)) == 0) { 240 | 241 | typeString = @stringify(CFRange); 242 | } 243 | else if (strcmp(type, @encode(CGAffineTransform)) == 0) { 244 | 245 | typeString = @stringify(CGAffineTransform); 246 | } 247 | else if (strcmp(type, @encode(CATransform3D)) == 0) { 248 | 249 | typeString = @stringify(CATransform3D); 250 | } 251 | else if (strcmp(type, @encode(SEL)) == 0) { 252 | 253 | typeString = @stringify(SEL); 254 | } 255 | else if (strcmp(type, @encode(Class)) == 0) { 256 | 257 | typeString = @stringify(Class); 258 | } 259 | else if (strcmp(type, @encode(LxOffset)) == 0) { 260 | 261 | typeString = @stringify(LxOffset); 262 | } 263 | else if (strcmp(type, @encode(LxEdgeInsets)) == 0) { 264 | 265 | typeString = @stringify(LxEdgeInsets); 266 | } 267 | else if (strcmp(type, @encode(short)) == 0) { 268 | 269 | typeString = @stringify(short); 270 | } 271 | else if (strcmp(type, @encode(int)) == 0) { 272 | 273 | typeString = @stringify(int); 274 | } 275 | else if (strcmp(type, @encode(long)) == 0) { 276 | 277 | typeString = @stringify(long); 278 | } 279 | else if (strcmp(type, @encode(long long)) == 0) { 280 | 281 | typeString = @stringify(long long); 282 | } 283 | else if (strcmp(type, @encode(float)) == 0) { 284 | 285 | typeString = @stringify(float); 286 | } 287 | else if (strcmp(type, @encode(double)) == 0) { 288 | 289 | typeString = @stringify(double); 290 | } 291 | else if (strcmp(type, @encode(long double)) == 0) { 292 | 293 | typeString = @stringify(long double); 294 | } 295 | else if (strcmp(type, @encode(BOOL)) == 0) { 296 | 297 | typeString = @stringify(BOOL); 298 | } 299 | else if (strcmp(type, @encode(bool)) == 0) { 300 | 301 | typeString = @stringify(bool); 302 | } 303 | else if (strcmp(type, @encode(char)) == 0) { 304 | 305 | typeString = @stringify(char); 306 | } 307 | else if (strcmp(type, @encode(unsigned short)) == 0) { 308 | 309 | typeString = @stringify(unsigned short); 310 | } 311 | else if (strcmp(type, @encode(unsigned int)) == 0) { 312 | 313 | typeString = @stringify(unsigned int); 314 | } 315 | else if (strcmp(type, @encode(unsigned long)) == 0) { 316 | 317 | typeString = @stringify(unsigned long); 318 | } 319 | else if (strcmp(type, @encode(unsigned long long)) == 0) { 320 | 321 | typeString = @stringify(unsigned long long); 322 | } 323 | else if (strcmp(type, @encode(unsigned char)) == 0) { 324 | 325 | typeString = @stringify(unsigned char); 326 | } 327 | else if (strcmp(type, @encode(char *)) == 0) { 328 | 329 | typeString = @stringify(char *); 330 | } 331 | else if (strcmp(type, @encode(void)) == 0) { 332 | 333 | typeString = @stringify(void); 334 | } 335 | else if (strcmp(type, @encode(void *)) == 0) { 336 | 337 | typeString = @stringify(void *); 338 | } 339 | else if (__lx_first_char_for_string(type) == '[' && __lx_last_char_for_string(type) == ']') { 340 | 341 | typeString = @stringify(array); 342 | } 343 | else if (__lx_first_char_for_string(type) == '{' && __lx_last_char_for_string(type) == '}') { 344 | 345 | typeString = @stringify(struct); 346 | } 347 | else if (__lx_first_char_for_string(type) == '(' && __lx_last_char_for_string(type) == ')') { 348 | 349 | typeString = @stringify(union); 350 | } 351 | else if (__lx_first_char_for_string(type) == '^') { 352 | 353 | typeString = @stringify(pointer); 354 | } 355 | else if (__lx_first_char_for_string(type) == 'b') { 356 | 357 | typeString = @stringify(bit_field); 358 | } 359 | else if (strcmp(type, "?") == 0) { 360 | 361 | typeString = @stringify(unknown_type); 362 | } 363 | else { 364 | typeString = @"LxDBAnything:Can not distinguish temporarily!😂"; 365 | } 366 | 367 | va_end(variable_param_list); 368 | 369 | return typeString; 370 | } 371 | 372 | static NSObject * __lx_stringify_object_value(NSObject * object) 373 | { 374 | if ([object isKindOfClass:[NSArray class]]) { 375 | 376 | NSMutableArray * arrayObject = [NSMutableArray array]; 377 | 378 | for (id obj in (NSArray *)object) { 379 | [arrayObject addObject:__lx_stringify_object_value(obj)]; 380 | } 381 | 382 | return [NSArray arrayWithArray:arrayObject]; 383 | } 384 | else if ([object isKindOfClass:[NSDictionary class]]) { 385 | 386 | NSMutableDictionary * dictionaryObject = [NSMutableDictionary dictionary]; 387 | 388 | [(NSDictionary *)object enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key, id _Nonnull obj, BOOL * _Nonnull stop) { 389 | 390 | [dictionaryObject setValue:__lx_stringify_object_value(obj) forKey:LxBoxToString(key)]; 391 | }]; 392 | 393 | return [NSDictionary dictionaryWithDictionary:dictionaryObject]; 394 | } 395 | else if ([object isKindOfClass:[NSSet class]]) { 396 | 397 | NSMutableArray * arrayObject = [NSMutableArray array]; 398 | 399 | for (id obj in (NSSet *)object) { 400 | [arrayObject addObject:__lx_stringify_object_value(obj)]; 401 | } 402 | 403 | return [NSArray arrayWithArray:arrayObject]; 404 | } 405 | else if ([object isKindOfClass:[NSOrderedSet class]]) { 406 | 407 | NSMutableArray * arrayObject = [NSMutableArray array]; 408 | 409 | for (id obj in (NSOrderedSet *)object) { 410 | 411 | [arrayObject addObject:__lx_stringify_object_value(obj)]; 412 | } 413 | 414 | return [NSArray arrayWithArray:arrayObject]; 415 | } 416 | else { 417 | 418 | return LxBoxToString(object); 419 | } 420 | } 421 | 422 | static NSDictionary * LxDictionaryFromObject(NSObject * object) 423 | { 424 | NSCAssert([object isKindOfClass:[NSObject class]], ([NSString stringWithFormat:@"LxDBAnything:%@ type error!", object])); 425 | 426 | NSMutableDictionary * objectDictionary = [NSMutableDictionary dictionary]; 427 | 428 | unsigned int outCount = 0; 429 | 430 | objc_property_t * propertyList = class_copyPropertyList([object class], &outCount); 431 | 432 | for (int i = 0; i < outCount; i++) { 433 | 434 | objc_property_t property = propertyList[i]; 435 | 436 | NSString * propertyName = [NSString stringWithUTF8String:property_getName(property)]; 437 | 438 | if ([object respondsToSelector:NSSelectorFromString(propertyName)]) { 439 | 440 | @try { 441 | NSObject * propertyValue = [object valueForKey:propertyName]; 442 | [objectDictionary setValue:__lx_stringify_object_value(propertyValue) forKey:propertyName]; 443 | } 444 | @catch (NSException *exception) { 445 | LxDBAnyVar(exception); // 446 | [objectDictionary setValue:nil forKey:propertyName]; 447 | } 448 | } 449 | } 450 | free(propertyList); 451 | 452 | return [NSDictionary dictionaryWithDictionary:objectDictionary]; 453 | } 454 | 455 | static NSString * __lx_json_db_object_string(NSObject * object) 456 | { 457 | return [NSString stringWithFormat:@"%@ = %@", object.description, LxJsonFromObject(object)]; 458 | } 459 | 460 | static NSString * __lx_xml_db_object_string(NSObject * object) 461 | { 462 | return [NSString stringWithFormat:@"%@ = %@", object.description, LxXmlFromObject(object)]; 463 | } 464 | 465 | static NSString * LxJsonFromObject(NSObject * object) 466 | { 467 | NSError * error = nil; 468 | 469 | NSDictionary * objectDictionary = LxDictionaryFromObject(object); 470 | NSData * jsonData = [NSJSONSerialization dataWithJSONObject:objectDictionary options:NSJSONWritingPrettyPrinted error:&error]; 471 | NSString * jsonString = [[NSString alloc]initWithData:jsonData encoding:NSUTF8StringEncoding]; 472 | return jsonString; 473 | } 474 | 475 | static NSString * LxXmlFromObject(NSObject * object) 476 | { 477 | NSError * error = nil; 478 | 479 | NSDictionary * objectDictionary = LxDictionaryFromObject(object); 480 | NSData * xmlData = [NSPropertyListSerialization dataWithPropertyList:objectDictionary format:NSPropertyListXMLFormat_v1_0 options:0 error:&error]; 481 | NSString * xmlString = [[NSString alloc]initWithData:xmlData encoding:NSUTF8StringEncoding]; 482 | return xmlString; 483 | } 484 | 485 | static NSString * __lx_view_hierarchy_description(UIView * view, NSInteger depth) 486 | { 487 | static NSString * unitIndentSpaceString = @" "; 488 | 489 | NSString * indentSpaceString = @" "; 490 | for (int i = 0; i < depth; i++) { 491 | indentSpaceString = [indentSpaceString stringByAppendingString:unitIndentSpaceString]; 492 | } 493 | 494 | NSString * viewHierarchyDescription = [NSString stringWithFormat:@"%zi#%@%@\n", depth, indentSpaceString, view]; 495 | 496 | depth++; 497 | 498 | for (UIView * subview in view.subviews) { 499 | 500 | viewHierarchyDescription = [viewHierarchyDescription stringByAppendingString:__lx_view_hierarchy_description(subview, depth)]; 501 | } 502 | 503 | return viewHierarchyDescription; 504 | } 505 | 506 | static NSString * LxViewHierarchyDescription(UIView * view) 507 | { 508 | NSCAssert([view isKindOfClass:[UIView class]], @""); 509 | 510 | NSString * viewHierarchyDescription = @""; 511 | NSInteger depth = 0; 512 | viewHierarchyDescription = [viewHierarchyDescription stringByAppendingString:__lx_view_hierarchy_description(view, depth)]; 513 | return viewHierarchyDescription; 514 | } 515 | 516 | #endif /* LxDBAnything_h */ 517 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/UIView+Frame.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Frame.h 3 | // 4 | // 5 | // Created by ws ou on 12-4-27. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define TT_FIX_CATEGORY_BUG(name) @interface TT_FIX_CATEGORY_BUG_##name:NSObject @end \ 12 | @implementation TT_FIX_CATEGORY_BUG_##name @end 13 | 14 | @interface UIView (UIView_Frame) 15 | 16 | 17 | @property(nonatomic, assign) CGFloat x; 18 | @property(nonatomic, assign) CGFloat y; 19 | @property(nonatomic, assign) CGFloat width; 20 | @property(nonatomic, assign) CGFloat height; 21 | // 22 | @property(nonatomic,assign) CGSize size; 23 | @property(nonatomic,assign) CGPoint origin; 24 | // 25 | @property(nonatomic,readonly) CGFloat left; 26 | @property(nonatomic,readonly) CGFloat top; 27 | @property(nonatomic,assign) CGFloat right; 28 | @property(nonatomic,assign) CGFloat bottom; 29 | 30 | @property(nonatomic, assign) CGFloat centerY; 31 | @property(nonatomic, assign) CGFloat centerX; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/UIView+Frame.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Frame.m 3 | // 4 | // 5 | // Created by ws ou on 12-4-27. 6 | // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "UIView+Frame.h" 10 | 11 | TT_FIX_CATEGORY_BUG(UIView_Frame) 12 | @implementation UIView (Frame) 13 | 14 | 15 | -(CGFloat)x 16 | { 17 | return self.frame.origin.x; 18 | } 19 | -(void)setX:(CGFloat)x 20 | { 21 | self.frame = CGRectMake(x, self.y, self.width, self.height); 22 | } 23 | 24 | -(CGFloat)y 25 | { 26 | return self.frame.origin.y; 27 | } 28 | -(void)setY:(CGFloat)y 29 | { 30 | self.frame = CGRectMake(self.x, y, self.width, self.height); 31 | } 32 | 33 | -(CGFloat)width 34 | { 35 | return self.frame.size.width; 36 | } 37 | -(void)setWidth:(CGFloat)width 38 | { 39 | self.frame = CGRectMake(self.x, self.y, width, self.height); 40 | } 41 | 42 | -(CGFloat)height 43 | { 44 | return self.frame.size.height; 45 | } 46 | -(void)setHeight:(CGFloat)height 47 | { 48 | self.frame = CGRectMake(self.x, self.y, self.width, height); 49 | } 50 | 51 | -(CGFloat) left 52 | { 53 | return self.x; 54 | } 55 | -(CGFloat) top 56 | { 57 | return self.y; 58 | } 59 | -(CGFloat) right 60 | { 61 | return self.x + self.width; 62 | } 63 | - (void)setRight:(CGFloat)right 64 | { 65 | self.x = right-self.width; 66 | } 67 | -(CGFloat) bottom 68 | { 69 | return self.y + self.height; 70 | } 71 | -(void)setBottom:(CGFloat)bottom 72 | { 73 | self.y = bottom - self.height; 74 | } 75 | -(void)setCenterX:(CGFloat)centerX 76 | { 77 | self.center = CGPointMake(centerX, self.center.y); 78 | } 79 | -(CGFloat)centerX 80 | { 81 | return self.center.x; 82 | } 83 | 84 | -(void)setCenterY:(CGFloat)centerY 85 | { 86 | self.center = CGPointMake(self.center.x, centerY); 87 | } 88 | -(CGFloat)centerY 89 | { 90 | return self.center.y; 91 | } 92 | 93 | -(void)setSize:(CGSize)size 94 | { 95 | self.frame = CGRectMake(self.x, self.y, size.width, size.height); 96 | } 97 | -(CGSize)size 98 | { 99 | return self.frame.size; 100 | } 101 | -(CGPoint)origin 102 | { 103 | return self.frame.origin; 104 | } 105 | -(void)setOrigin:(CGPoint)origin 106 | { 107 | self.frame = CGRectMake(origin.x, origin.y, self.width, self.height); 108 | } 109 | 110 | @end 111 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/background@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/background@2x.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/Sources/background@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/JikeScrollView/JikeScrollView/Sources/background@3x.png -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // JiKeScrollView 4 | // 5 | // Created by 李龙 on 16/11/22. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollViewTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollViewTests/JikeScrollViewTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // JiKeScrollViewTests.m 3 | // JiKeScrollViewTests 4 | // 5 | // Created by 李龙 on 16/11/22. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JiKeScrollViewTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation JiKeScrollViewTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollViewUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /JikeScrollView/JikeScrollViewUITests/JikeScrollViewUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // JiKeScrollViewUITests.m 3 | // JiKeScrollViewUITests 4 | // 5 | // Created by 李龙 on 16/11/22. 6 | // Copyright © 2016年 李龙. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JiKeScrollViewUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation JiKeScrollViewUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 李龙 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JiKeScrollView 2 | 模仿即刻首页滚动效果 3 | 4 | - 简书地址: 5 | [《 仿『即刻』首页滚动效果》](http://www.jianshu.com/p/1b3ccfba1f6f) 6 | - 个站地址: 7 | [《 仿『即刻』首页滚动效果》](http://www.lilongcnc.cc/2016/11/24/24-%E4%BB%BF%E3%80%8E%E5%8D%B3%E5%88%BB%E3%80%8F%E9%A6%96%E9%A1%B5%E6%BB%9A%E5%8A%A8%E6%95%88%E6%9E%9C/?preview_id=272&preview_nonce=59ece59ecb&post_format=standard&preview=true) 8 | 9 | ## 摘要 10 | 优秀的应用总是值得我们去模仿,即刻的`首页的推荐主题内容滚动效果`和`个人信息页面的头像拖动效果`,还有`视频播放`等效果都值得我们去模仿和学习。 前段时间看到的巴巴巴巴巴巴掌的模仿首页滚动效果的安卓代码,并且分析实现的原理,于是便想着用iOS的代码也写一下。 11 | 上边提到的文章地址:巴巴巴巴巴巴掌的[《手摸手教你写炫酷控件》](https://github.com/JeasonWong/JikeGallery) 12 | 13 | ## 实现效果 14 | ![](http://www.lilongcnc.cc/lauren_picture/20161123/JikeScrollView.gif) 15 | 16 | ## 实现说明 17 | 执行动画效果是直接用的UIView自带的动画方法. 18 | 我是图片滚动再写到文字滚动,然后再包含到外边的动态数据传入.所以整个`JiKeScrollView`的项目结构如下,每个文件都是一个单独的控件,都可以单独提取出来使用。 19 | ![](http://upload-images.jianshu.io/upload_images/594219-8be99cd7d49ed223.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 20 | 21 | 22 | 23 | ### 数据驱动显示 24 | 这个名字有点大了,其实就是就考虑到我们在实际使用时候怎么方便一点.我这里的逻辑是: 25 | 26 | 先传入初始化的信息,代码如下: 27 | 28 | _myJikeScrollView.myFirstShowImageLinkArray = @[ 29 | @[@"11",@"12"], 30 | @[@"13",@"14"], 31 | @[@"15",@"16"] 32 | ]; 33 | _myJikeScrollView.myFirstShowLabelDesArray = @[ 34 | @[@"左边初始描述文字1",@"左边初始描述文字2"], 35 | @[@"中间初始描述文字3",@"中间初始描述文字4"], 36 | @[@"右边初始描述文字5",@"右边初始描述文字6"] 37 | ]; 38 | 39 | 40 | 如果想要执行滚动的时候,我们只需要传入下一组数据就行了,如下代码: 41 | 42 | _myJikeScrollView.myNextShowImageLinkArray = self.tempImageLinkDataArray[dataShowIndex]; 43 | _myJikeScrollView.myNextShowLabelDesArray = self.tempImageDesDataArray[dataShowIndex]; 44 | 45 | 46 | 其实我们仔细观察『即刻』点击`换一换`,左边是有个圆形指针再转的,我想这个时候是在请求下下次我们要显示的数据.这样便可以保持每次次点击`换一换`之后能够马上`有数据滚动`. 47 | 48 | 49 | ### 其他 50 | 51 | 因为完整代码有点多,所以Demo中分为了三部分,除了完整代码,还有是把基础组件单个使用的的`JiKeScrollImageViewVC`和`JiKeScrollLabelVC`. 52 | 53 | ![JiKeScrollLabelVC](http://upload-images.jianshu.io/upload_images/594219-f0f5897e74bd616a.gif?imageMogr2/auto-orient/strip) 54 | ![JiKeScrollImageViewVC](http://upload-images.jianshu.io/upload_images/594219-3893820864ff4c70.gif?imageMogr2/auto-orient/strip) 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /screenShot/JikeScrollView.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lilongcnc/JiKeScrollView/db117de3df91b5123ac070f0ffcbd0e14485c5ef/screenShot/JikeScrollView.gif --------------------------------------------------------------------------------