热更新demo

HotCommentAnswerIconCell.m 2.6KB

    // // HotCommentAnswerIconCell.m // ThePaperBase // // Created by zhousan on 15/11/23. // Copyright © 2015年 scar1900. All rights reserved. // #import "HotCommentAnswerIconCell.h" @implementation HotCommentAnswerIconCell - (void)subLayoutSubViews { __weak typeof(self) weakSelf = self; [self.backView makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self.left).offset(10); make.right.equalTo(self.right).offset(-10); make.top.equalTo(self); make.bottom.equalTo(self); }]; [self.answerIcon makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self.backView).offset(10); make.top.equalTo(self.backView).offset(12); make.size.mas_equalTo(CGSizeMake(28, 28)); }]; [self.iconButton makeConstraints:^(MASConstraintMaker *make) { make.edges.equalTo(self.answerIcon); }]; [self.iconBack makeConstraints:^(MASConstraintMaker *make) { make.edges.equalTo(self.answerIcon); }]; [self.timeImg makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(weakSelf.answerIcon.right).offset(10); make.top.equalTo(weakSelf.anserNameLabel.bottom).offset(7); make.height.mas_equalTo(10); make.width.mas_equalTo(10); }]; [self.nameButton makeConstraints:^(MASConstraintMaker *make) { make.right.equalTo(self.anserNameLabel); make.bottom.equalTo(self.anserNameLabel); make.height.mas_equalTo(25); make.width.equalTo(self.anserNameLabel); }]; [self.timeLabel makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(weakSelf.timeImg.right).offset(5); make.top.equalTo(weakSelf.anserNameLabel.bottom).offset(8); make.height.mas_equalTo(9); make.width.mas_equalTo(rect_screen.size.width/2); }]; [self.OkButton makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(weakSelf.backView.right).offset(-40); make.top.equalTo(weakSelf.anserNameLabel.top).offset(-2); make.width.mas_equalTo(30); make.height.mas_equalTo(35); }]; [self.hostLabel makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(weakSelf.anserNameLabel.right).offset(5); make.top.equalTo(weakSelf.anserNameLabel.top); make.width.mas_equalTo(27); make.height.mas_equalTo(12); }]; } /* // Only override drawRect: if you perform custom drawing. // An empty implementation adversely affects performance during animation. - (void)drawRect:(CGRect)rect { // Drawing code } */ @end