1
我怎樣才能找出我點擊哪個部分?我需要的號碼發送到另一個視圖的項目:如何獲取選定的自定義TableViewCell的節號?
- (IBAction)mapButton:(id)sender {
UIButton * myButton = sender;
int row=myButton.tag;
NSIndexPath * indexPath = [NSIndexPath indexPathForRow:row inSection:0];
MapViewController *detail = [self.storyboard instantiateViewControllerWithIdentifier:@"mapView"];
self.selectedStandort = [self.fetchedResultsController objectAtIndexPath:indexPath];
detail.currentStandort = self.selectedStandort;
[self.navigationController pushViewController:detail animated:YES];
}
我的mapButton在自定義tableviewcell中,我給了他一個標籤。你的解決方案沒有奏效,你能否給我另一個解決方案? – 2012-04-20 10:12:00
我忘了該按鈕在UITableViews contentView中。 因此,該單元是[[發件人超級查看]超級查看]來代替。 我編輯了我的答案以反映這種變化。 – Thyraz 2012-04-20 10:18:38
它的作品非常感謝你 – 2012-04-20 10:23:15