I'm trying to use the new shuffledArray
method to shuffle the elements in an NSMutableArray
. I have the Array declared:
@property (strong, nonatomic) NSMutableArray *mArray;
Then I call the method
mArray = [[self.mArray shuffledArray] mutableCopy];
But I'm getting the exception:
-[__NSArrayM shuffledArray]: unrecognized selector sent to instance 0x1c4451340
I've imported the GameplayKit
Framework as well, and my app's target is iOS 10.0 so I'm not sure what's wrong.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.