这个是我的一个订单详情页面,我需要点击退款成功那个按钮跳入退款流程页面,但是数据是从我这个页面的一个数组拿的,所以我需要获取到点击的位置,我之前又在网上查过试过
// UITableViewCell cell = (UITableViewCell )[[but superview]superview];
NSIndexPath *indexPath = [self.tabView indexPathForCell:cell];
//
这个方法,可以并不能,希望有大神能帮我解决一下,如果可以的话,希望能解释一下,大神帮帮忙,谢谢
Add a property to your Cell.h, NSIndexPath *indexPath; when assigning a value to the cell (assigning a value to the cell in the cellForRow or cellWillDisplay method), pass the indexPath of the TableView to the cell and let the cell save it. When the button on the cell is clicked, it is passed through the proxy. Then pass it to VC and it’s OK
Hey. Are you not using MVC?
Then why does your cell know whether this line of payment is for testing products, nougat, or cocktails?The tag of the button is set to the array subscript, and finally the data is found based on the subscript