Guest User

Untitled

a guest
Jul 18th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. -(void)createData {
  2.  
  3. NSMutableArray *poolFixtures; //poolFixtures being the text within each cell of my table view.
  4.  
  5. groupSections=[[NSMutableArray alloc] initWithObjects: @"Pool Stages", nil]
  6.  
  7. poolFixtures=[[NSMutableArray alloc] init];
  8.  
  9.  
  10. [poolFixtures addObject:[[NSMutableDictionary alloc]
  11. initWithObjectsAndKeys:@This is a name",@"name",nil]];
  12.  
  13. fixtureData=[[NSMutableArray alloc] initWithObjects: poolFixtures, nil];
  14. [poolFixtures release];
  15.  
  16. Object obj = [[Object alloc] init];
  17. ViewController *vc = [[ViewController alloc] initWithNibName:@"NibName" bundle:nil];
  18. // this is a public property of the viewcontroller
  19. vc.array = [object methodThatReturnsArray];
  20. [self.navigationController pushViewController:vc];
  21.  
  22. -(NSArray *)methodThatReturnsArray
  23. {
  24. NSArray* array = [[[NSArray alloc] init] autorelease];
  25. // some code here that adds to the usefulness of the array
  26. return array;
  27. }
Add Comment
Please, Sign In to add comment