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