File was renamed from EZSDK/EZSDK/EZ/Venders/MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.m |
| | |
| | | #import "MJRefreshBackGifFooter.h" |
| | | |
| | | @interface MJRefreshBackGifFooter() |
| | | @property (weak, nonatomic) UIImageView *gifView; |
| | | { |
| | | __unsafe_unretained UIImageView *_gifView; |
| | | } |
| | | /** 所有状态对应的动画图片 */ |
| | | @property (strong, nonatomic) NSMutableDictionary *stateImages; |
| | | /** 所有状态对应的动画时间 */ |
| | |
| | | } |
| | | |
| | | #pragma mark - 实现父类的方法 |
| | | - (void)prepare |
| | | { |
| | | [super prepare]; |
| | | |
| | | // 初始化间距 |
| | | self.labelLeftInset = 20; |
| | | } |
| | | |
| | | - (void)setPullingPercent:(CGFloat)pullingPercent |
| | | { |
| | | [super setPullingPercent:pullingPercent]; |
| | |
| | | { |
| | | [super placeSubviews]; |
| | | |
| | | if (self.gifView.constraints.count) return; |
| | | |
| | | self.gifView.frame = self.bounds; |
| | | if (self.stateLabel.hidden) { |
| | | self.gifView.contentMode = UIViewContentModeCenter; |
| | | } else { |
| | | self.gifView.contentMode = UIViewContentModeRight; |
| | | self.gifView.mj_w = self.mj_w * 0.5 - 90; |
| | | self.gifView.mj_w = self.mj_w * 0.5 - self.labelLeftInset - self.stateLabel.mj_textWith * 0.5; |
| | | } |
| | | } |
| | | |