项目
在 GitHub 查看
brow/leaves
关于
适用于 iOS 应用的翻页界面
开发工具实测星标增长
- 24小时
- 0
- 7天
- -1
- 15天
- -1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文#Leaves
Leaves is an animated interface for navigating through a sequence of images using page-turning gestures. As of iOS 5, Leaves is mostly obsoleted by UIPageViewController.
Leaves requires iOS 3.0 or later.
##Installation
- Add the files in the
Leavessubdirectory to your Xcode project. - Ensure that your target links against
QuartzCore.framework.
##Usage
Creating a page-turning view controller is as simple as subclassing LeavesViewController:
#import "LeavesViewController.h"
@interface ColorSwatchViewController : LeavesViewController
@end
...and implementing the LeavesViewDataSource protocol:
@implementation ColorSwatchViewController
- (NSUInteger)numberOfPagesInLeavesView:(LeavesView*)leavesView {
return 10;
}
- (void)renderPageAtIndex:(NSUInteger)index inContext:(CGContextRef)context {
CGContextSetFillColorWithColor(
context,
[[UIColor colorWithHue:index/10.0
saturation:0.8
brightness:0.8
alpha:1.0] CGColor]);
CGContextFillRect(ctx, CGContextGetClipBoundingBox(ctx));
}
@end
You may also use LeavesView directly. For more examples, see the included
LeavesExamples project.
##Forks
- Two-page view by ole (blog post)
- Zooming by hammerlyrodrigo
- ARC by tjboudreaux
- Retina support by Vortec4800
Articles
探索相关项目
加载中…