| 12345678910111213141516171819202122232425262728 |
- //
- // GGBannerCollectionViewCell.m
- // GGBannerViewDemo
- //
- // Created by GuinsooMBP on 15/10/16.
- // Copyright (c) 2015年 gaonan. All rights reserved.
- //
- #import "GGBannerCollectionViewCell.h"
- @implementation GGBannerCollectionViewCell
- - (instancetype)initWithFrame:(CGRect)frame {
- self = [super initWithFrame:frame];
- if (self) {
- self.imageView = [[UIImageView alloc]init];
- // self.imageView.translatesAutoresizingMaskIntoConstraints = NO;
- self.imageView.frame = CGRectMake(0, 0, kScreenW, kScreenH);
- self.imageView.contentMode = UIViewContentModeScaleAspectFill;
- self.imageView.clipsToBounds = YES;
- [self.contentView addSubview:self.imageView];
- // [self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-0-[_imageView]-0-|" options:0 metrics:0 views:NSDictionaryOfVariableBindings(_imageView)]];
- // [self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-0-[_imageView]-0-|" options:0 metrics:0 views:NSDictionaryOfVariableBindings(_imageView)]];
- }
- return self;
- }
- @end
|