码迷,mamicode.com
首页 > 其他好文 > 详细

[翻译] TGLStackedViewController

时间:2014-06-22 10:47:19      阅读:290      评论:0      收藏:0      [点我收藏+]

标签:style   class   blog   code   http   tar   

TGLStackedViewController

bubuko.com,布布扣

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

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

bubuko.com,布布扣

 

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

 

附录:

bubuko.com,布布扣

 

[翻译] TGLStackedViewController,布布扣,bubuko.com

[翻译] TGLStackedViewController

标签:style   class   blog   code   http   tar   

原文地址:http://www.cnblogs.com/YouXianMing/p/3801749.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!