How to remove a Static Cell from a UITableView designed in StoryBoard

前端 未结 9 2492
情话喂你
情话喂你 2020-12-13 09:43

The solution is probably very simple, but I couldn\'t just find it .. !

Working with storyboard (iOS 5), I have a tableViewController, and a designed ST

9条回答
  •  旧时难觅i
    2020-12-13 10:10

    // just authed with facebook, and I want to delete the first 3 rows of my 4 row table that are no longer necessary    
    - (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section {
        if(wantsFacebook)
            return 1;
    
        return 4;
    }
    

    After committing the updates, the tableView will call the numberOfRowsInSection delegate to get the updated number of rows and it MUST be the correct sum/difference between the rows when you started the insert/delete and the rows when you ended the insert/delete

提交回复
热议问题