Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 返回索引数组目标c_Objective C_Arrays_Return Value - Fatal编程技术网

Objective c 返回索引数组目标c

Objective c 返回索引数组目标c,objective-c,arrays,return-value,Objective C,Arrays,Return Value,有人知道用这样一个简单的函数返回数组索引的快速方法吗 假设这两个在索引处相同:5从我的数组返回一个5整数。您可以使用NSArray的方法: 对于对象所在的最低索引的32位或64位应用程序,它分别为int或long返回一个整数a typedef。Super尽管indexOfObject有效,但另一个indexOfObjectIdenticalTo无效; if([appDelegate.exerciseReference containsObject:aExerciseRef.IDE]) {

有人知道用这样一个简单的函数返回数组索引的快速方法吗

假设这两个在索引处相同:5从我的数组返回一个5整数。

您可以使用NSArray的方法:


对于对象所在的最低索引的32位或64位应用程序,它分别为int或long返回一个整数a typedef。

Super尽管indexOfObject有效,但另一个indexOfObjectIdenticalTo无效;
  if([appDelegate.exerciseReference containsObject:aExerciseRef.IDE])
  {
      //return indexofwhere the object is the same ....  
  }
if([appDelegate.exerciseReference containsObject:aExerciseRef.IDE])
{
    return [appDelegate.exerciseReference indexOfObjectIdenticalTo:aExerciseRef.IDE];
}