Search code examples
iosobjective-crubymotion

RubyMotion reload sections of UITableView


How can I reload specific section of a table?

[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:indexPath.section] withRowAnimation:UITableViewRowAnimationFade]

How can I write something like this in ruby's syntax?


Solution

  • Here it is in RubyMotion syntax:

    sections = NSIndexSet.indexSetWithIndex(indexPath.section)
    self.tableView.reloadSections sections, withRowAnimation:UITableViewRowAnimationFade