plangrid / ReactiveLists

React-like API for UITableView & UICollectionView
https://plangrid.github.io/ReactiveLists
MIT License
251 stars 15 forks source link

Add ifExists: to subscripts that return optional #133

Closed benasher44 closed 6 years ago

benasher44 commented 6 years ago

Changes in this pull request

This adds ifExists: to the subscript methods that return an Optional. This will help, if/when we move forward with Collection conformance for TableViewModel and CollectionViewModel because Collection subscript methods have a non-Optional return type.

Checklist

benasher44 commented 6 years ago

The littering of ifExists: is a tad annoying, but in most cases, this API shouldn't be used publicly.