2013-02-05 uicollectionview

17
Awesome UI class ;) UICollectionView

Upload: cocoaheads-tricity

Post on 15-Jan-2015

544 views

Category:

Technology


3 download

DESCRIPTION

 

TRANSCRIPT

Page 1: 2013-02-05 UICollectionView

Awesome UI class ;)UICollectionView

Page 2: 2013-02-05 UICollectionView

AGENDA

• Introduction

• „Big picture”

• UICollectionView architecture, data model & interaction

• FlowLayout - basic tool (but powerful)

• Live Demo

• Questions

Page 3: 2013-02-05 UICollectionView

Łukasz DomaradzkiSoftware Research Engineer @ Jeppesen Polandcontact: [email protected]: http://about.me/lukasz.domaradzki

Page 4: 2013-02-05 UICollectionView

„BIG PICTURE”

Page 5: 2013-02-05 UICollectionView
Page 6: 2013-02-05 UICollectionView
Page 7: 2013-02-05 UICollectionView
Page 8: 2013-02-05 UICollectionView

DO YOU KNOW OTHER APPS?

Page 9: 2013-02-05 UICollectionView

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?

Page 10: 2013-02-05 UICollectionView

ANATOMY

CellsSupplementary

Views

DecorationViews

Let’s dig inside.

Page 11: 2013-02-05 UICollectionView

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

Page 12: 2013-02-05 UICollectionView

ARCHITECTURE

Page 13: 2013-02-05 UICollectionView

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

Page 14: 2013-02-05 UICollectionView

WHAT ABOUT IOS BELOW 6.0?

• PSTCollectionViewhttps://github.com/steipete/PSTCollectionView100% API replacement, available from iOS 4.3+

Page 15: 2013-02-05 UICollectionView

You know what time it is?

LIVE DEMO!

Page 16: 2013-02-05 UICollectionView

Sources:- WWDC2012

- Introducing CollectionViews- Advanced Collection Views and Building Custom Layouts

- NSHipster.com- RayWenderlich.com

Page 17: 2013-02-05 UICollectionView

Questions?Thanks for listening.