1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- //
- // YOUPAISYBaseTableCell.m
- // VQU
- //
- // Created by leo on 2020/4/21.
- // Copyright © 2020 leo. All rights reserved.
- //
- #import "YOUPAISYBaseTableCell.h"
- @implementation YOUPAISYBaseTableCell
- - (void)awakeFromNib {
- [super awakeFromNib];
- }
- + (instancetype)cellWithTableView:(UITableView *)tableView {
- NSString *className = NSStringFromClass([self class]);
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:className];
- if(!cell) {
- cell = [[[super class] alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:className];
- }
-
- return (YOUPAISYBaseTableCell *)cell;
- }
- - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
- if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
- [self youpaifsetupUI];
- }
- return self;
- }
- - (void)youpaifsetupUI {
- self.backgroundColor = UIColor.whiteColor;
-
- self.selectedBackgroundView = [[UIView alloc] initWithFrame:self.bounds] ;
- self.selectedBackgroundView.backgroundColor = [UIColor whiteColor];
-
- [self setNeedsUpdateConstraints];
- }
- - (void)dealloc {
- NSLog(@"%@ 释放了...", NSStringFromClass([self class]));
- }
- @end
|