0
我想讓showEventDate方法讓數據像下面的tableview那樣傳入,我該怎麼做?我不能在該方法中放入indexPath。謝謝。Xcode JSON代理
-(void)showEventDate
{
EventView *rvc = [[EventView alloc]initWithNibName:@"EventView" bundle:nil];
[navController pushViewController:rvc animated:YES];
[rvc release];
}
// Display a details screen for the selected holiday/row.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
Event *holiday = [dataSource holidayAtIndexPath:indexPath];
HolidaysDetailViewController *vc = [[[HolidaysDetailViewController alloc] initWithHoliday:holiday] autorelease];
[navController pushViewController:vc animated:YES];
}
否,showEventDate是調用一個按鈕.navigationItem.leftBarButtonItem = [[[ALLOC的UIBarButtonItem] initWithTitle的方法:@ 「事件列表」 樣式:UIBarButtonItemStyleBordered目標:自動作:@selector(showEventDate)]自動釋放]。但是當我點擊按鈕時,數據wasnt傳入,顯示所有空值,因此我需要把該方法的索引路徑將數據推入按鈕 – user1116989 2011-12-27 03:16:38