Simple and optimize way to achieve your functionality
Take a NSObject
class like
#import <Foundation/Foundation.h>
@interface YourClassName : NSObject
@property (nonatomic, strong) NSString *imgName;
@property (nonatomic, strong) NSData *imgData;
@property (nonatomic, strong) NSString *imgDate;
@end
Then, add the object of the class to NSMutableArray
, then mutate it as your wish. Just delete from one array rather than deleting from three different arrays, which is very confusing and may conflicts.
Or
Just Use NSMutableArray
instead of NSArray
. If you are doing this already, then check NSMutableArray
contains NSArray
type values, which can't be immutable.
Thanks