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

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -