Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. ->@property (nonatomic ,strong) NSMutableArray *name;
  2.  
  3. - (id)initWithFrame:(CGRect)frame viewName:(NSInteger)viewDecide datasourceName:(NSMutableArray *)nameRef
  4. {
  5.  
  6. }
  7.  
  8. self.name=[NSMutableArray alloc]initWithObjects:@"1",@"2",@"3", nil];
  9.  
  10. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  11. {
  12. return[self.name count];
  13. }
  14.  
  15. [strongSelf.name insertObject:@"something" atIndex:0];
  16. [strongSelf.tableViewDataView1 insertRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:0 inSection:0], nil] withRowAnimation:UITableViewRowAnimationLeft];
  17.  
  18. and for deleting i used
  19.  
  20. [strongSelf.name removeObjectAtIndex:0];
  21. [strongSelf.tableViewDataView1 deleteRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:0 inSection:0], nil] withRowAnimation:UITableViewRowAnimationLeft];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement