123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- //
- // JXWellBeingCell.m
- // shiku_im
- //
- // Created by 123 on 2020/5/29.
- // Copyright © 2020 Reese. All rights reserved.
- //
- #import "JXWellBeingCell.h"
- @interface JXWellBeingCell()
- @property (nonatomic,weak) UIImageView *backIMG;
- @property (nonatomic,weak) JXCsHomeVc *homeVc;
- @end
- @implementation JXWellBeingCell
- - (void)awakeFromNib {
- [super awakeFromNib];
- // Initialization code
- }
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
- // Configure the view for the selected state
- }
- -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
-
- if (self=[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
-
-
- UIImageView *backIMG=[[UIImageView alloc]init];
- backIMG.image=[UIImage imageNamed:@""];
- backIMG.contentMode=UIViewContentModeScaleAspectFill;
- [self.contentView addSubview:backIMG];
- self.backIMG=backIMG;
- [backIMG mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(10);
- make.right.mas_equalTo(-10);
- make.top.mas_equalTo(0);
- make.height.mas_equalTo(129);
- }];
- /*
- UIView *leftView=[[UIView alloc]init];
- leftView.backgroundColor=[UIColor whiteColor];
- [self.contentView addSubview:backIMG];
- [leftView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(0);
- make.bottom.mas_equalTo(-20);
- make.height.mas_equalTo(24);
- }];
-
- UIImageView *leftIMG=[[UIImageView alloc]init];
- leftIMG.image=[UIImage imageNamed:@""];
- [leftView addSubview:leftIMG];
- [leftIMG mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(10);
- make.centerY.mas_equalTo(leftView.mas_centerY);
- }];
-
- UILabel *titleL=[[UILabel alloc]init];
- titleL.text=@"长期活动";
- [leftView addSubview:titleL];
- [titleL mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerY.mas_equalTo(leftIMG.mas_centerY);
- make.left.mas_equalTo(leftIMG.mas_right).mas_offset(5);
- }];*/
- }
-
- return self;
- }
- + (instancetype)cellWithTableView:(UITableView *)tableView
- {
- static NSString *ID = @"JXWellBeingCell";
- JXWellBeingCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
-
- if (!cell) {
- cell = [[JXWellBeingCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];
- cell.selectionStyle=UITableViewCellSelectionStyleNone;
- }
- return cell;
- }
- -(void)setFrame:(CGRect)frame{
- frame.origin.y+=15;
- frame.size.height-=15;
- [super setFrame:frame];
- }
- -(void)setStrURL:(NSString *)strURL{
- _strURL=strURL;
-
- self.backIMG.image=[UIImage imageNamed:strURL];
- }
- @end
|