-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if (buttonIndex==0) return ;
model *hero =self.heros[alertView.tag];
NSString *text = [alertView textFieldAtIndex:0].text;
hero.name =text;
//上面这句与c语言不通,c语言中之修改传递了的参数,而这块就相当于把self.heros[alert.tag]也修改了。
[self.tableView reloadData];
}
oc与c在参数传递这块的区别
最新推荐文章于 2018-12-21 15:16:18 发布