use*_*452 1 xcode uitableview nsmutablearray ios
我有一个NSMutableArray在编辑TableView时经常被编辑.我想要做的是运行检查并查看TableView中的行是否与NSMutableArray中的任何数字匹配,如果相同,则执行操作.所以,在TableView代码中我有:
if([thearray containsObject:indexPath.row] {
//perform action here
}
Run Code Online (Sandbox Code Playgroud)
但是我一直收到错误:
Incompatible integer to pointer conversion sending 'NSInteger' (aka 'int') to parameter of type 'id';
Run Code Online (Sandbox Code Playgroud)
我做错了什么,怎么能这样做?
使用此代码......
if([thearray containsObject:[NSNumber numberWithInt:indexPath.row]]) {
//perform action here
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1533 次 |
| 最近记录: |