문제

Is this valid:

 NSObject anObject = [[NSObject alloc] init];
 [array1 addObject:anObject];
 [array2 addObject:anObject];

My money is on yes, since I'm only adding references to the same object, or am I wrong here?

도움이 되었습니까?

해결책

Yes :) Dont forget to make it a mutable array

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top