Cannot add something to an array swift

 Problem:

I want add some values to an array iOS swift.Not able to add in that.


Solution:

It's not possible to add values in an array.You can assign values to an array is possible.

In NSMutableArray only you can add values in that dynamically.


var value:NSArray!

value.addObject(some value).    ////not possible


var value:NSMutableArray!

value.addObject(some value).    ////possible


Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

store cgpoint in userdefaults iOS swift