I am a newbie trying collectionview in Obj C
override init(frame:CGRect){
super.init(frame:frame)
let thumbnailImageView: UIImageView = {
let imageView = UIImageView()
imageView.backGroundColor = UIColor.blueColor()
return imageView;
}
addSubView(thumbnailImageView)
thumbnailImageView.frame = CGRectMake(0,0,100,100)
}
i am trying to achieve above swift code in Obj C . I have tried below code but sub view is not showing.
#import "VideoCell.h"
@implementation VideoCell
- (instancetype) initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
UIImageView * thumbnailImageView = [[UIImageView alloc] init];
thumbnailImageView.backgroundColor = [UIColor greenColor];
thumbnailImageView.frame = CGRectMake(0, 0, 100, 100);
[self addSubview:thumbnailImageView];
}
return self;
}