PGIndexBannerSubiew.m
1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// PGIndexBannerSubiew.m
// NewPagedFlowViewDemo
//
// Created by Mars on 16/6/18.
// Copyright © 2016年 Mars. All rights reserved.
// Designed By PageGuo,
// QQ:799573715
// github:https://github.com/PageGuo/NewPagedFlowView
#import "PGIndexBannerSubiew.h"
@interface PGIndexBannerSubiew()
@end
@implementation PGIndexBannerSubiew
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleCellTapAction:)];
[self addGestureRecognizer:singleTap];
}
return self;
}
- (void)singleCellTapAction:(UIGestureRecognizer *)gesture {
if (self.didSelectCellBlock) {
self.didSelectCellBlock(self.tag, self);
}
}
- (void)setSubviewsWithSuperViewBounds:(CGRect)superViewBounds {
// if (CGRectEqualToRect(self.mainImageView.frame, superViewBounds)) {
// return;
// }
// self.mainImageView.frame = superViewBounds;
// self.coverView.frame = superViewBounds;
}
@end