UITableView Editing Not working

I have a UITableView which lies in a NavigationController that is in a popover. So, I put an edit/done UIToolBarItem which works fine and you can see the delete accessory icon showing up. However, when I rearrange the items, the edit/done button stops working...

I debugged and it still gets called but it doesn't seem to update and is sort of preventing any further updates from other buttons. Is this possibly a problem with the simulator?

Thanks for the help in advance!

Edit: Adding code

addButton = [[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStyleBordered     target:self action:@selector(editTable:)];

And later on the method:

- (IBAction) editTable: (id) sender
    if ([[addButton title] isEqualToString:EDIT_STRING]) {
        [addButton setTitle:DONE_STRING]; //enabling edit mode  
        [super setEditing:YES animated:YES];
        [[self tableView] setEditing:YES animated:YES];
    else {
        [addButton setTitle:EDIT_STRING]; //done with editing
        [[self tableView] setEditing:NO animated:YES];
        [super setEditing:NO animated:YES];

        [[self tableView] setNeedsDisplay];
        [[self tableView] reloadData];  

The second part is definitely called as the addButton text is changing. However, it stops working once I make an edit (such as re-arranging a row)



I seemed to have called [tableView beginUpdates] and never called endUpdates, which was causing all updates to not be registered. If anyone else does that...

Need Your Help

Constructor confusion

syntax constructor dart

This is part of class Balls that come from Dart samples(clock sample):

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.