要填充兩個NSMutableArray
s到的tableView
2個自定義欄目;填充NSMutableArrays定製部分
我有兩個NSMutableArray
s的事件,我想將它們分開到現在,今天的部分。
對於第一部分:
我想從nowEvents陣列刪除事件,並將它們放到我的弗里斯特部分。
EventClass *event = [appDelegate.nowEvents objectAtIndex:indexPath.row];
event.startTime
是我的事件
event.endTime
的開始時間是我的事件
對於第2段的結束時間: 刪除的事件,現在正在發生
EventClass *event = [appDelegate.todayEvents objectAtIndex:indexPath.row];
我想知道的是numberOfRowsInSection
方法,它會是什麼樣子和cellForRowAtIndexPath
(她e我試過NSInteger section = [indexPath section]; if (section == 0) { } if (section == 1) {}
- 但如果我現在不會發生這樣的事件,怎麼辦?)
它不會在原始顯示,但它會顯示我的頭部分,它是具有自定義圖像,我不希望顯示的,如果我所以沒有在該節 –
無論如何你 - ( CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section;如果if([self.tableView numberOfRowsInSection:section] <= 0)返回0; –
實際上它在我的 - (UIView的*)的tableView:(UITableView的*)的tableView viewForHeaderInSection:(NSInteger的)部分的方法;如果我在這裏把if條件,我的應用程序崩潰, –