The Problem is First time I get data from WebServices so I have show this data on TableView Then user scroller down tableview then again call WebSevices and add this data to again in array
but when I try to add data again in nsmutable type array app is crashing
Here is my code. Any solution?
1st time Data load is Working
var ary_mutable: NSMutableArray!
ary_mutable = NSMutableArray()
ary_mutable=jsonResult as AnyObject as! NSMutableArray
self.tbl_T.reloadData();
self.tbl_T.delegate=self;
self.tbl_T.dataSource=self;
2nd Time data load and add with old array not Working
var myArray :NSArray!
myArray = jsonResult as AnyObject as! NSArray
ary_mutable.addObject(myArray.objectAtIndex(0))
Got This Error
[__NSCFArray insertObject:atIndex:]: mutating method sent to immutable object'
I have Try this code also But Not Working
ary_mutable.addObject(myArray)