Last active
December 21, 2015 10:09
-
-
Save stephsharp/6289785 to your computer and use it in GitHub Desktop.
Insert an object into a property of type NSArray by creating a mutable copy.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@property (nonatomic, retain) NSArray * pins; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)insertPin:(PinViewController *)pin | |
{ | |
NSMutableArray * mutablePinsArray = [self.pins mutableCopy]; | |
[mutablePinsArray addObject:pin]; | |
self.pins = mutablePinsArray; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment