0
我有兩個NSMuteableArray
s。第一個(nameOfSectionArray)收集每個新節的名稱。第二個(numberOfRowsArray)收集每個部分應該有多少行。我在使用這些數組創建一個UITableView
時遇到問題,它具有適當數量的行數正確的部分。用2行創建多個UITableView節NSMuteableArrays
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return [nameOfSectionsArray count];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [numberOfRowsArray objectAtIndex:section];
}
-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{
return [nameOfSectionsArray objectAtIndex:section];
}
該程序不會崩潰。我只是沒有得到任何行。所有部分都正確出來。有人能幫我用我的numberOfRowsInSection
方法嗎?
謝謝!