Welcome, Guest
Username Password: Remember me
  • Page:
  • 1

TOPIC: Lazy question

Lazy question 1 year, 3 months ago #1

Does [tableViewModel removeSectionAtIndex:index] use animation when deleting? While I'm asking, does the insertSection method also use animation?

I'm current using

[tableViewModel.modeledTableView reloadSections:indexSet withRowAnimation:UITableViewRowAnimationNone];


but now would like the section along with the header removed and inserted.

If not, how can I achieve the desired effect?

Gary
  • panamind
  • OFFLINE
  • Senior Boarder
  • Posts: 77
  • Karma: 4

Re: Lazy question 1 year, 3 months ago #2

I became unlazy and experimented myself and found that:

 
NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:[tableViewModel indexForSection:[tableViewModel sectionAtIndex:1]]];
[tableViewModel removeSectionAtIndex:1];
[tableViewModel.modeledTableView deleteSections:indexSet withRowAnimation:UITableViewRowAnimationBottom];
 


works fine.

I would be nice to have:

 
 
[tableViewModel removeSectionAtIndex:1 withAnimation:UITableViewRowAnimationBottom];
 
 


to handle the deletion (and insertion) to the tableview.
  • panamind
  • OFFLINE
  • Senior Boarder
  • Posts: 77
  • Karma: 4

Re: Lazy question 1 year, 3 months ago #3

  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72
  • Page:
  • 1
Time to create page: 0.78 seconds