ios - Copy NSMutableArray to NSArray in iPhone -


I am copying the contents of NSMutableArray to NSArray in the table section number of rows in the section

  - (NSInteger) table view: (UITableView *) table view numberofrose injection: (NSInteger) section {if ([appDelegate.selectedCalenDAteEqualToString: @ "TODAY"]) ​​{back to appDelegate.calenderSowArray.count; } And if ([appDelegate.selectedCalenDAteEqualToString: @ "this week"]) {// NSArray * newArr = [NSArray arrayWithArray: testArray]; NSArray * newArr = [NSArray arrayWithArray: [testArray objectAtIndex: section]]; New ARR return; }   

Using the above method, it does not show any object in the new array while testArray has two objects.

change

  NSArray * newArr = [NSArray arrayWithArray: [testArray objectAtIndex: section]]; With   

  NSArray * newArr = [testArray copy];    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -