xai3 / Shoyu

Easier way to represent the structure of UITableView.
MIT License
278 stars 24 forks source link

Core data support #12

Closed samhann closed 8 years ago

samhann commented 8 years ago

I'd like to work on easier Core data support (FetchedResultsController) . Your thoughts ?

xai3 commented 8 years ago

Although I didn't think it, It is necessary. Please try the following implementation.

Source() { source in
  source.createSections(fetchResultsController.sections ?? []) { sectionInfo, section in
    section.createRows(sectionInfo.objects ?? []) { object, row in
      row.configureCell { cell in
        // Configure cell
      }
    }
  }
}

Thanks!

samhann commented 8 years ago

Cool , with your blessings I'll proceed.

I'm really digging this project as even I feel that UITableViewControllers definitely need a Swifty refresh. But we need to support a lot of things that people use them for.

Core Data support is one gap we could plug.

The main reason why UITableViewControllers suck is that they become extremely bloated. The code needs to be moved out for eg :

A lot of times people put their animations in willDisplayCell: . We need to find a neat substitute for that.

I'll get on it the core data thing.