[翻译] TGLStackedViewController

TGLStackedViewController是一款基于UICollectionView的手势重排抽屉布局组件,受Passbook及Reminders应用启发。通过继承并重写方法,实现UICollectionView的数据源及代理协议,可在Storyboard中配置。

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

 

附录:

 

转载于:https://www.cnblogs.com/YouXianMing/p/3801749.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值