heavyrain2012 před 4 roky
rodič
revize
077d31365c

+ 1 - 1
wfchat/WildFireChat/Me/WFCSettingTableViewController.m

@@ -237,7 +237,7 @@
         [btn setTitleColor:[UIColor colorWithHexString:@"0xf95569"]
                   forState:UIControlStateNormal];
         [btn addTarget:self action:@selector(onLogoutBtn:) forControlEvents:UIControlEventTouchUpInside];
-        [cell addSubview:btn];
+        [cell.contentView addSubview:btn];
     }
     
     return cell;

+ 5 - 5
wfuikit/WFChatUIKit/CommonVC/WFCUProfileTableViewController.m

@@ -196,7 +196,7 @@
         btn.titleLabel.font = [UIFont pingFangSCWithWeight:FontWeightStyleRegular size:16];
         [btn addTarget:self action:@selector(setFriendNote) forControlEvents:UIControlEventTouchUpInside];
         btn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
-        [alisaCell addSubview:btn];
+        [alisaCell.contentView addSubview:btn];
         [self showSeparatorLine:alisaCell];
         [self.headerCells addObject:alisaCell];
 
@@ -253,7 +253,7 @@
         momentButton.titleLabel.font = [UIFont pingFangSCWithWeight:FontWeightStyleRegular size:16];
         momentButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
         [momentButton addTarget:self action:@selector(momentClick) forControlEvents:UIControlEventTouchUpInside];
-        [self.momentCell addSubview:momentButton];
+        [self.momentCell.contentView addSubview:momentButton];
         self.momentCell.selectionStyle = UITableViewCellSelectionStyleNone;
         self.momentCell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
     }
@@ -270,7 +270,7 @@
         [btn setTitleColor:[WFCUConfigManager globalManager].textColor forState:UIControlStateNormal];
         btn.titleLabel.font = [UIFont pingFangSCWithWeight:FontWeightStyleMedium size:16];
         [btn addTarget:self action:@selector(onSendMessageBtn:) forControlEvents:UIControlEventTouchDown];
-        [self.sendMessageCell addSubview:btn];
+        [self.sendMessageCell.contentView addSubview:btn];
         [self showSeparatorLine:self.sendMessageCell];
         
 #if WFCU_SUPPORT_VOIP
@@ -285,7 +285,7 @@
         [btn addTarget:self action:@selector(onVoipCallBtn:) forControlEvents:UIControlEventTouchDown];
         [btn setTitleColor:[UIColor colorWithHexString:@"0x5b6e8e"] forState:UIControlStateNormal];
         btn.titleLabel.font = [UIFont pingFangSCWithWeight:FontWeightStyleMedium size:16];
-        [self.voipCallCell addSubview:btn];
+        [self.voipCallCell.contentView addSubview:btn];
 #endif
     } else if([[WFCCNetworkService sharedInstance].userId isEqualToString:self.userId]) {
         
@@ -300,7 +300,7 @@
         [btn addTarget:self action:@selector(onAddFriendBtn:) forControlEvents:UIControlEventTouchDown];
         btn.layer.cornerRadius = 5.f;
         btn.layer.masksToBounds = YES;
-        [self.addFriendCell addSubview:btn];
+        [self.addFriendCell.contentView addSubview:btn];
         
     }
     [self.tableView reloadData];

+ 3 - 3
wfuikit/WFChatUIKit/ConversationSetting/ViewController/WFCUConversationSettingViewController.m

@@ -664,7 +664,7 @@
           btn.titleLabel.font = [UIFont pingFangSCWithWeight:FontWeightStyleRegular size:16];
           [btn setTitleColor:[UIColor colorWithHexString:@"0xf95569"] forState:UIControlStateNormal];
           [btn addTarget:self action:@selector(clearMessageAction) forControlEvents:UIControlEventTouchUpInside];
-          [cell addSubview:btn];
+          [cell.contentView addSubview:btn];
       }
       return cell;
   } else if([self isQuitGroup:indexPath]) {
@@ -683,7 +683,7 @@
             btn.titleLabel.font = [UIFont pingFangSCWithWeight:FontWeightStyleRegular size:16];
             [btn setTitleColor:[UIColor colorWithHexString:@"0xf95569"] forState:UIControlStateNormal];
             [btn addTarget:self action:@selector(onDeleteAndQuit:) forControlEvents:UIControlEventTouchUpInside];
-            [cell addSubview:btn];
+            [cell.contentView addSubview:btn];
         }
         return cell;
   } else if([self isUnsubscribeChannel:indexPath]) {
@@ -705,7 +705,7 @@
           
           btn.backgroundColor = [UIColor redColor];
           [btn addTarget:self action:@selector(onDeleteAndQuit:) forControlEvents:UIControlEventTouchUpInside];
-          [cell addSubview:btn];
+          [cell.contentView addSubview:btn];
       }
       return cell;
   } else if([self isGroupFileCell:indexPath]) {