InfiniteScrollPicker
====================
InfiniteScrollPicker is a subclass of UIScrollView and providing infinite scrolling and size scaling for central items (refer to screenshot). This is a control that I wrote for Emodex (https://itunes.apple.com/app/emodex/id598162115?mt=8) and now I refactorred the code and open-source it to everyone. I am not going to maintain this control anymore. If you find any bug or idea to implement, please help to improve if you loved it. I appreciate for the help.
[Video Demo](http://www.youtube.com/watch?v=-3Rq3ycxjs8)
![ScreenShot](https://raw.github.com/Seitk/InfiniteScrollPicker/master/screenshot0.png) ![ScreenShot](https://raw.github.com/Seitk/InfiniteScrollPicker/master/emodex.jpg)
Usage
setImageAry - Basically you init the InfiniteScrollPicker with frame, set image array for it and add it to your view then everything is working.
setItemSize - By default the item size is equal to your image size, but you can still set item size to specify another size for the item.
Remarks: This control assumes all images in the array have the same size.
setAlphaOfobjs - By default the item alpha is 1.0. You can configure the item alpha to have a highlighted feel. (Except the selected item, it's alpha is always 1.0)
setPositionRatio - I am not going to talk a lot on it, but bascially it affects the alignment of items. PositionRatio = 1.0 (align bottom), PositionRatio = 2.0 (vertical align center), PositionRatio = itemSize.height (vertical align top)
setHeightOffset - give offset to the scrolling items. It calculates from bottom to top.
Item selection callback
I was decided to make a delegate for this control but I need to subscribe to UIScrollViewDelegate in the picker view. So it is not allowed to have another delegate. At the result, it perform a selector when item snapped. You should implement the method in the view controller. It gives you an UIImage then you could calculate the selected index from the image array you passed in.
\- (void)infiniteScrollPicker:(InfiniteScrollPicker *)infiniteScrollPicker didSelectAtImage:(UIImage *)image
Example
InfiniteScrollPicker *isp = [[InfiniteScrollPicker alloc] initWithFrame:CGRectMake(0, 0, 320, 100)];
[isp setItemSize:CGSizeMake(50, 50)];
[isp setImageAry:set1];
[self.view addSubview:isp];
InfiniteScrollPicker *isp3 = [[InfiniteScrollPicker alloc] initWithFrame:CGRectMake(0, 240, 320, 210)];
[isp3 setImageAry:set3];
[isp3 setHeightOffset:20];
[isp3 setPositionRatio:2];
[isp3 setAlphaOfobjs:0.8];
[self.view addSubview:isp3];
Contact Me
You can add me on Facebook - http://www.facebook.com/seitkk
没有合适的资源?快使用搜索试试~ 我知道了~
滑动scrollview 使它上面的子view 变大变小
共97个文件
png:20个
jpeg:20个
m:18个
需积分: 13 49 下载量 190 浏览量
2014-06-23
16:21:13
上传
评论
收藏 827KB ZIP 举报
温馨提示
uiscrollview上添加ziview ,滑动子view变大变小,缺陷,scrollview上添加的资源有限,正在考虑利用tableview中的重用机制 。
资源推荐
资源详情
资源评论
收起资源包目录
InfiniteScrollPicker-1.zip (97个子文件)
InfiniteScrollPicker-1
screenshot0.png 262KB
.DS_Store 6KB
Resources
Set3
s3_17.jpeg 15KB
s3_0.jpeg 13KB
s3_5.jpeg 14KB
s3_19.jpeg 14KB
s3_11.jpeg 14KB
s3_10.jpeg 13KB
s3_12.jpeg 14KB
s3_1.jpeg 12KB
s3_15.jpeg 14KB
s3_6.jpeg 12KB
s3_3.jpeg 13KB
s3_bg.jpg 44KB
s3_18.jpeg 13KB
s3_9.jpeg 13KB
s3_2.jpeg 12KB
s3_8.jpeg 13KB
s3_14.jpeg 15KB
s3_7.jpeg 15KB
s3_4.jpeg 13KB
s3_16.jpeg 13KB
s3_13.jpeg 15KB
Set1
s1_0.png 4KB
s1_2.png 4KB
s1_4.png 4KB
s1_3.png 4KB
s1_1.png 4KB
s1_5.png 4KB
Set2
s2_9.png 9KB
s2_5.png 8KB
s2_8.png 8KB
s2_3.png 8KB
s2_7.png 9KB
s2_4.png 9KB
s2_6.png 9KB
s2_10.png 9KB
s2_2.png 8KB
s2_1.png 9KB
InfiniteScrollPickerExample
libraries
FlatUIKit
UIColor+FlatUI.m 4KB
FUISegmentedControl.m 6KB
UIColor+FlatUI.h 1014B
.DS_Store 12KB
UIBarButtonItem+FlatUI.h 1KB
UITabBar+FlatUI.h 328B
UIImage+FlatUI.m 7KB
FUISegmentedControl.h 642B
FUIButton.h 422B
UIStepper+FlatUI.m 2KB
UIStepper+FlatUI.h 459B
UIFont+FlatUI.m 1KB
UITabBar+FlatUI.m 543B
FUIButton.m 2KB
FUIAlertView.m 10KB
UIFont+FlatUI.h 341B
FUIAlertView.h 4KB
UIImage+FlatUI.h 989B
UINavigationBar+FlatUI.m 1KB
UIProgressView+FlatUI.h 364B
UIBarButtonItem+FlatUI.m 5KB
UISlider+FlatUI.m 2KB
UISlider+FlatUI.h 690B
FUISwitch.h 767B
FUISwitch.m 6KB
UIProgressView+FlatUI.m 705B
UINavigationBar+FlatUI.h 309B
.DS_Store 6KB
.DS_Store 6KB
InfiniteScrollPickerExample
InfiniteScrollPickerExample-Prefix.pch 357B
ViewController.m 2KB
en.lproj
ViewController.xib 2KB
InfoPlist.strings 45B
main.m 351B
Default-568h@2x.png 18KB
ViewController.h 263B
AppDelegate.h 379B
Default.png 6KB
Default@2x.png 16KB
InfiniteScrollPickerExample-Info.plist 1KB
AppDelegate.m 2KB
InfiniteScrollPickerExample.xcodeproj
project.xcworkspace
contents.xcworkspacedata 172B
xcuserdata
seitk.xcuserdatad
WorkspaceSettings.xcsettings 333B
UserInterfaceState.xcuserstate 23KB
vike.xcuserdatad
UserInterfaceState.xcuserstate 15KB
ericwang.xcuserdatad
UserInterfaceState.xcuserstate 12KB
xcuserdata
seitk.xcuserdatad
xcschemes
xcschememanagement.plist 499B
InfiniteScrollPickerExample.xcscheme 3KB
vike.xcuserdatad
xcschemes
xcschememanagement.plist 499B
InfiniteScrollPickerExample.xcscheme 3KB
ericwang.xcuserdatad
xcschemes
xcschememanagement.plist 499B
InfiniteScrollPickerExample.xcscheme 3KB
project.pbxproj 30KB
InfiniteScrollPicker
InfiniteScrollPicker.m 7KB
InfiniteScrollPicker.h 619B
UIView+viewController.h 451B
UIView+viewController.m 4KB
README.md 3KB
共 97 条
- 1
资源评论
liulichao20
- 粉丝: 9
- 资源: 46
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功