Skip to content

Commit 97e9db4

Browse files
committed
个人中心
1 parent b7589da commit 97e9db4

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

Coding_iOS/Controllers/MeDisplayViewController.m

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,29 +193,32 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
193193
return 3;
194194
}
195195

196-
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
196+
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
197197
if (section < 2) {
198-
return nil;
198+
return 0.0;
199199
}
200-
return self.sectionHeaderView;
201-
200+
return 44.0;
202201
}
203202

204-
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
203+
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
205204
if (section < 2) {
206-
return 0.0;
205+
return [UIView new];
207206
}
208-
return 44.0;
207+
return self.sectionHeaderView;
208+
209209
}
210210

211211
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
212212
if (section < 2) {
213213
return 20;
214214
}
215-
216215
return 0;
217216
}
218217

218+
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
219+
return [UIView new];
220+
}
221+
219222

220223
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
221224
if (section < 2) {

0 commit comments

Comments
 (0)