【发布时间】:2013-10-13 19:05:30
【问题描述】:
我正在尝试通过将数组中的对象替换为从警报视图返回的文本来替换它。
到目前为止我有:
int selected = indexPath.row;
对于我的 alertview 委托方法。
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if (alertView.tag == 1) {
[myMutableArray replaceObjectAtIndex:selected withObject:[[alertView textFieldAtIndex:0] text]];
[_tableView reloadData];
}
}
我不断收到错误
从“NSInteger”(又名“long”)分配给“NSInteger *”(又名“long *”)的指针转换不兼容的整数
【问题讨论】:
-
这是你的全部代码吗?你在哪里初始化 NSMutableArray?如果可能,请发布您的所有代码。
-
如果回答对您的问题有帮助,请标记。
标签: ios xcode uitableview nsmutablearray uialertview