Skip to content

Commit c4268da

Browse files
committed
添加成员提示 & 首页 lineV
1 parent 56034fc commit c4268da

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

Coding_iOS/Controllers/AddUserViewController.m

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,20 @@ - (BOOL)userIsQuering:(User *)curUser{
127127
}
128128
#pragma mark Table M
129129
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
130-
return 44;
130+
return _type == AddUserTypeFollow? 0: 44;
131131
}
132132

133133
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
134-
NSInteger leftNum = _curProject.max_member.integerValue - _addedArray.count;
135-
UILabel *label = [UILabel labelWithSystemFontSize:13 textColorHexString:leftNum > 0? @"0x999999": @"0xF34A4A"];
136-
label.backgroundColor = self.view.backgroundColor;
137-
label.textAlignment = NSTextAlignmentCenter;
138-
label.text = leftNum > 0? [NSString stringWithFormat:@"你还可以添加 %lu 个项目成员", leftNum]: @"已到达到成员最大数,不能再继续选择成员!";
139-
return label;
134+
if (_type == AddUserTypeFollow) {
135+
return [UIView new];
136+
}else{
137+
NSInteger leftNum = _curProject.max_member.integerValue - _addedArray.count;
138+
UILabel *label = [UILabel labelWithSystemFontSize:13 textColorHexString:leftNum > 0? @"0x999999": @"0xF34A4A"];
139+
label.backgroundColor = self.view.backgroundColor;
140+
label.textAlignment = NSTextAlignmentCenter;
141+
label.text = leftNum > 0? [NSString stringWithFormat:@"你还可以添加 %lu 个项目成员", leftNum]: @"已到达到成员最大数,不能再继续选择成员!";
142+
return label;
143+
}
140144
}
141145

142146
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{

Coding_iOS/Controllers/RootControllers/Message_RootViewController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,13 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
180180
cell.unreadCount = [_notificationDict objectForKey:kUnReadKey_notification_System];
181181
break;
182182
}
183-
[tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:75];
183+
[tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:75 hasSectionLine:NO];
184184
return cell;
185185
}else{
186186
ConversationCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellIdentifier_Conversation forIndexPath:indexPath];
187187
PrivateMessage *msg = [_myPriMsgs.list objectAtIndex:indexPath.row-3];
188188
cell.curPriMsg = msg;
189-
[tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:75];
189+
[tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:75 hasSectionLine:NO];
190190
return cell;
191191
}
192192
}

0 commit comments

Comments
 (0)