brow-leaves-67b10ed-(4)
Leaves 

所属分类:iPhone/iOS
开发工具:Objective-C
文件大小:3021KB
下载次数:15
上传日期:2012-03-27 19:49:44
上 传 者brewswang
说明:  iphone一个看书,看杂志,经典的翻页的程序,大家可以借鉴
(iphone is a reading, reading magazines, classic flip of the program, we can learn from)

文件列表:
brow-leaves-67b10ed (0, 2010-12-09)
brow-leaves-67b10ed\Classes (0, 2010-12-09)
brow-leaves-67b10ed\Classes\ExamplesViewController.h (230, 2010-12-09)
brow-leaves-67b10ed\Classes\ExamplesViewController.m (2196, 2010-12-09)
brow-leaves-67b10ed\Classes\ImageExampleViewController.h (258, 2010-12-09)
brow-leaves-67b10ed\Classes\ImageExampleViewController.m (1091, 2010-12-09)
brow-leaves-67b10ed\Classes\LeavesAppDelegate.h (379, 2010-12-09)
brow-leaves-67b10ed\Classes\LeavesAppDelegate.m (752, 2010-12-09)
brow-leaves-67b10ed\Classes\PDFExampleViewController.h (264, 2010-12-09)
brow-leaves-67b10ed\Classes\PDFExampleViewController.m (1593, 2010-12-09)
brow-leaves-67b10ed\Classes\ProceduralExampleViewController.h (254, 2010-12-09)
brow-leaves-67b10ed\Classes\ProceduralExampleViewController.m (718, 2010-12-09)
brow-leaves-67b10ed\LICENSE (1176, 2010-12-09)
brow-leaves-67b10ed\Leaves-Info.plist (974, 2010-12-09)
brow-leaves-67b10ed\Leaves.xcodeproj (0, 2010-12-09)
brow-leaves-67b10ed\Leaves.xcodeproj\project.pbxproj (18577, 2010-12-09)
brow-leaves-67b10ed\Leaves (0, 2010-12-09)
brow-leaves-67b10ed\Leaves\LeavesCache.h (660, 2010-12-09)
brow-leaves-67b10ed\Leaves\LeavesCache.m (2624, 2010-12-09)
brow-leaves-67b10ed\Leaves\LeavesView.h (2410, 2010-12-09)
brow-leaves-67b10ed\Leaves\LeavesView.m (10561, 2010-12-09)
brow-leaves-67b10ed\Leaves\LeavesViewController.h (497, 2010-12-09)
brow-leaves-67b10ed\Leaves\LeavesViewController.m (1277, 2010-12-09)
brow-leaves-67b10ed\Leaves_Prefix.pch (181, 2010-12-09)
brow-leaves-67b10ed\Other Sources (0, 2010-12-09)
brow-leaves-67b10ed\Other Sources\Utilities.h (227, 2010-12-09)
brow-leaves-67b10ed\Other Sources\Utilities.m (763, 2010-12-09)
brow-leaves-67b10ed\Resources-iPad (0, 2010-12-09)
brow-leaves-67b10ed\Resources-iPad\MainWindow-iPad.xib (14793, 2010-12-09)
brow-leaves-67b10ed\Resources (0, 2010-12-09)
brow-leaves-67b10ed\Resources\MainWindow.xib (16269, 2010-12-09)
brow-leaves-67b10ed\Resources\kitten.jpg (352427, 2010-12-09)
brow-leaves-67b10ed\Resources\kitten2.jpg (337699, 2010-12-09)
brow-leaves-67b10ed\Resources\kitten3.jpg (295667, 2010-12-09)
brow-leaves-67b10ed\Resources\paper.pdf (2145519, 2010-12-09)
brow-leaves-67b10ed\main.m (347, 2010-12-09)

#Leaves Leaves is a simple way to present a page-turning interface similar to Apple's iBooks. It comprises two classes, `LeavesView` and `LeavesViewController`, and occupies less than 100 kB compiled. It uses only public APIs, sacrificing a portion of iBooks' visual flair to ensure that your application is safe for submission to the App Store. Leaves supports: - Text, images, PDFs -- anything that can be rendered in a graphics context - Drag or tap to turn the page - iPad- and iPhone-sized display areas Leaves does *not* currently support: - Interactive elements on the page - Swipe gestures - Two-page landscape view Leaves requires iPhone OS 3.0 or later. #Installation Add the files in the `Leaves` subdirectory to your Xcode project and ensure that you are linking against `QuartzCore.framework`. #Getting Started Creating a page-turning interface is as simple as subclassing `LeavesViewController`: @interface ColorSwatchViewController : LeavesViewController @end ...and implementing the `LeavesViewDataSource` protocol: @implementation ColorSwatchViewController - (NSUInteger) numberOfPagesInLeavesView:(LeavesView*)leavesView { return 10; } - (void) renderPageAtIndex:(NSUInteger)index inContext:(CGContextRef)ctx { CGContextSetFillColorWithColor(ctx, [[UIColor colorWithHue:index/10.0 saturation:0.8 brightness:0.8 alpha:1.0] CGColor]); CGContextFillRect(ctx, CGContextGetClipBoundingBox(ctx)); } @end For more sophisticated examples, build the Xcode project included with Leaves. #Notes The best way to get an answer to your question about programming with Leaves is the [Leaves Developers mailing list](http://groups.google.com/group/leaves-developers), which I keep an eye on. But if you find a bug, be sure to visit the [tracker](http://github.com/brow/leaves/issues) or message me directly.

近期下载者

相关文件


收藏者