初始化collectionViewCell

#import <UIKit/UIKit.h>

 

@interface TonyCollectionViewCell : UICollectionViewCell

@property UIImageView *imgView;

@end

 

#import "TonyCollectionViewCell.h"

 

@implementation TonyCollectionViewCell

 

 

@synthesize imgView;

 

- (instancetype)initWithFrame:(CGRect)frame{

    // 初始化

    self=[super initWithFrame:frame];

    if(self){

        self.imgView=[[UIImageView alloc]initWithFrame:(CGRectMake(0, 0, 100, 100))];

        [self addSubview:self.imgView];

    }

    return self;

}

posted @ 2015-05-15 16:06  碧水晴天  阅读(446)  评论(0编辑  收藏  举报