我在UITableViewCell中添加了一个UISwitch,table内容是动态的,这意味着一个tableview中可能有很多UISwitch,我需要为每个UITableViewCell获取UISwitch状态,但没有获取indexPathaccessoryButtonTappedForRowWithIndexPath方法中的。我的代码是:-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexPath{LocationCell*cell=(Locati