2013-02-05 uicollectionview
DESCRIPTION
TRANSCRIPT
Awesome UI class ;)UICollectionView
AGENDA
• Introduction
• „Big picture”
• UICollectionView architecture, data model & interaction
• FlowLayout - basic tool (but powerful)
• Live Demo
• Questions
Łukasz DomaradzkiSoftware Research Engineer @ Jeppesen Polandcontact: [email protected]: http://about.me/lukasz.domaradzki
„BIG PICTURE”
DO YOU KNOW OTHER APPS?
WHAT EXACTLY IS IT?
• UI class, similar to UITableView (not a replacement)
• very powerful (customizable)
• your UX/graphic designer will love it ;)
• available iOS 6.0+ (not only... more later)
O’rly?
ANATOMY
CellsSupplementary
Views
DecorationViews
Let’s dig inside.
CELLS• No predefined styles
(like in UITableView)
• New properties - selection & highlight
• New reuse format (improved)[cV registerClass: ...][cV registerNib: ...]
[cV dequeReusableCell...]
UICollectionViewCell
Background View
Selected Background View
Content View
ARCHITECTURE
VIEW (FLOW) LAYOUTCSS for your UICollectionView !
UICollectionViewLayout is an abstract base class for positioning cell views and their supplementary and decoration views. But rather than subclass this directly, most applications will opt to use or subclass UICollectionViewFlowLayout. Flow layouts cover the broad class of layouts with some notion of linearity, whether that's a single row or column or a grid.
nshipster.com
WHAT ABOUT IOS BELOW 6.0?
• PSTCollectionViewhttps://github.com/steipete/PSTCollectionView100% API replacement, available from iOS 4.3+
You know what time it is?
LIVE DEMO!
Sources:- WWDC2012
- Introducing CollectionViews- Advanced Collection Views and Building Custom Layouts
- NSHipster.com- RayWenderlich.com
Questions?Thanks for listening.