#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;
}
时间: 2024-11-15 18:57:14