I have several arrays, however, they do not keep their data for use in other ways.
Here's how I set it up (Simplified)
.h
NSArray * array ; @property (nontromic, copy) NSArray * array; - (zero) someMethod: (NSArray *) someArray; - (zero) heresNewMethod;
meter
- (zero) someMethod: (NSArray *) someArray {array = [someArray copy]; } - (zero) heresNewMethod // is not called by law {nslog (@ "% @", array);
One of two things happened:
- You sent a
some method:
message to the object,zero
(possibly without meaning) passed. Returns a messagezero
forzero
, so you've specified the result as a result ofzero
as acopy
message < Code> array example variable even if you had already placed an indicator in an array, then you have to do it withzero
with some code:some method:
Replaced with message - You have never sent a
some method to the object:
as the example is started in the variable variablezero
, and youarray < / Code> Do not keep anything separate in the example variable, it still has
zero
.
To test the first code, sprinkle more NSLog statements in your code. The truth is either one or the other, so the confirmation of the first principle demeans the other, and vice versa.
Comments
Post a Comment