https://github.com/YouXianMing

[翻译] TGLStackedViewController

TGLStackedViewController

A stack layout with gesture-based reordering using UICollectionView -- inspired by Passbook and Reminders apps.

这是一种使用了UICollectionView,基于手势重新排版的抽屉布局,灵感来自于Passbook以及提醒app。

 

Getting Started

Take a look at sample project TGLStackedViewExample.xcodeproj.

请查看demo程序。

 

Usage

Via CocoaPods: 用CocoaPods安装

  • Add pod 'TGLStackedViewController', '~> 1.0' to your project's Podfile

Or the "classic" way: 或者将文件夹拖入到你的工程当中

  • Add files in folder TGLStackedViewController to your project

Then in your project: 然后在你的工程中

  • Create a derived class from TGLStackedViewController and overwrite method -moveItemAtIndexPath:toIndexPath: 继承并重写一个方法
  • Implement UICollectionDataSource (currently only 1 section supported) and UICollectionViewDelegateprotocols 实现两个协议
  • Place UICollectionViewController in your storyboard and set its class to your derived class 在storyboard中进行一些设置

 

Requirements

  • ARC
  • iOS >= 6.0
  • Xcode 5

 

附录:

 

posted @ 2014-06-22 07:36  YouXianMing  阅读(439)  评论(0编辑  收藏  举报