Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Deleting Cells of tableview ios

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 268
    Comment on it

    Hello friends,

    To delete a cell at a particular indexpath you may use the following code:

    -(void)removeItemAtIndexPath:(NSIndexPath *)indexPath{
    
        [(name of table) beginUpdates];
    
    // I am assuming that you're just using a plain NSMutableArray to drive the data on the table.
    
    // Delete the object from the datasource.
    
    
     [(name of your array) removeObjectAtIndex:indexPath.row];
    
    // Tell the table what has changed.
    [(name of table) deleteRowsAtIndexPaths:@[indexPath]
                          withRowAnimation:UITableViewRowAnimationRight];
    
    [(name of table)endUpdates];
    }
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: