Advertisement
RRK

Pass Array

RRK
May 21st, 2013
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Function in leftside VC
  2.  
  3. - (void)buttonClicked
  4. {
  5.     if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
  6.        {
  7.          self.calNotesView = [[CalNotesViewController alloc]initWithNibName:@"CalNotesViewController_iPad" bundle:nil];
  8.          NSMutableArray *testarray = [[NSMutableArray alloc]initWithObjects:@"Rocky",@"John", nil];
  9.        
  10.         [self.calNotesView loadTableWithArray:testarray];
  11.     }
  12. }
  13.  
  14. - (void)loadTableWithArray:(NSMutableArray *)array
  15. {
  16.     m_Array = [[NSMutableArray alloc]init];
  17.     for(int i = 0 ;i <[array count]; i++)
  18.     {
  19.         [m_Array addObject:[array objectAtIndex:i]];      
  20.     }
  21.    
  22.     NSLog(@"Count:%d",m_Array.count);
  23.        
  24.     [m_tableView reloadData];
  25.    
  26.    
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement