collection view 数据
创建cell 和supplementary views
- Use the dequeueReusableCellWithReuseIdentifier:forIndexPath: to get a cell for an item in the collection view.
- Use the dequeueReusableSupplementaryViewOfKind:withReuseIdentifier:forIndexPath: method to get a supplementary view requested by the layout object
- before you use thess methods ,you should tell the colleciton view how to create the correspongding view if one not created. For this, you must register either a class or a nib file with the collection view.For example , when registering cells, you should use ’ registerClass: forCellWithReuseIdentifier ..or nib’