这里UICollectionReusableView即是UICollectionView的Header,可以跟随整体一起滑动的。这个效果类似UITableView的header。
1.我是以xib的形式创建的
2.接下来就是主要的代码了
#import "ViewController.h"
#import "MyCell.h"
#import "SuppleView.h"
#define Width [UIScreen mainScreen].bounds.size.width
#define Height [UIScreen mainScreen].bounds.size.height
@interface ViewController ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
@property (retain) UICollectionView* collectionView;
@end
@implementation ViewController
- (