1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- //
- // TopicGroupManageCell.m
- // smartRhino
- //
- // Created by niuzhen on 2019/12/18.
- // Copyright © 2019 tederen. All rights reserved.
- //
- #import "TopicGroupManageCell.h"
- @implementation TopicGroupManageCell
- - (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
- }
- + (TopicGroupManageCell *)configCell0:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
- static NSString *cellIdentifer = @"TopicGroupManageCell0";
- TopicGroupManageCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
- if (cell == nil || !cell) {
- cell = [[[NSBundle mainBundle] loadNibNamed:@"TopicGroupManageCell" owner:nil options:nil] objectAtIndex:0];
- }
- cell.selectionStyle = UITableViewCellSelectionStyleNone;
- return cell;
- }
- + (TopicGroupManageCell *)configCell1:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
- static NSString *cellIdentifer = @"TopicGroupManageCell1";
- TopicGroupManageCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
- if (cell == nil || !cell) {
- cell = [[[NSBundle mainBundle] loadNibNamed:@"TopicGroupManageCell" owner:nil options:nil] objectAtIndex:1];
- }
- cell.selectionStyle = UITableViewCellSelectionStyleNone;
- return cell;
- }
- - (void)layoutSubviews
- {
- for (UIView *supView in self.subviews){
- if ([supView isKindOfClass:NSClassFromString(@"UITableViewCellReorderControl")]){
- for (UIView *view in supView.subviews)
- {
- if ([view isKindOfClass: [UIImageView class]])
- {
- UIImageView * imagV = (UIImageView *)view;
- [imagV setFrame:CGRectMake(0, 0, 22, 18)];
- imagV.center = supView.center;
- imagV.contentMode = UIViewContentModeCenter;
- imagV.image = [UIImage imageNamed: @"list_sort"];
- UILabel * label = [UILabel new];
- label.backgroundColor = UIColorHex(#EAEAEA);
- [supView addSubview:label];
- [label setFrame:CGRectMake(0, supView.frame.size.height - 0.5, supView.frame.size.width, 0.5)];
- }else{
- [view removeFromSuperview];
- }
- }
- }
- }
- [super layoutSubviews];
- }
- @end
|