users = [users arrayByAddingObjectsFromArray:arrayvalue];
users is a NSMutableArray
and arrayvalue is also a NSMutableArray
, I am adding value of arrayvalue to the users array but I am getting a warning "incompatible pointer types assigning to NSMutableArray
from NSArray
".
I hav searched, but was unable to find a solution for this.
Although arrayvalue
is NSMutableArray, the return value of arrayByAddingObjectsFromArray:
is NSArray
, and that's why you get this warning.
You should call [users addObjectsFromArray:arrayvalue];
which alters the array returns.NSMutableArray
See the NSMutableArray
reference for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With