将NSMutableArray中的数字与indexPath.row进行比较

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)

我做错了什么,怎么能这样做?

Fog*_*ter 6

使用此代码......

if([thearray containsObject:[NSNumber numberWithInt:indexPath.row]]) {
   //perform action here
}
Run Code Online (Sandbox Code Playgroud)