Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publicly expose the data source property #163

Closed
cdzombak opened this issue Feb 29, 2016 · 1 comment
Closed

Publicly expose the data source property #163

cdzombak opened this issue Feb 29, 2016 · 1 comment
Milestone

Comments

@cdzombak
Copy link
Contributor

cdzombak commented Feb 29, 2016

(Issue moved from the README in 3a4cfae )

PhotosViewController's data source should be exposed publicly, so that clients can add/remove photos from it or provide a new data source.

This is a more general solution, and better follows Cocoa design conventions, than adding methods for adding/deleting photos on PhotosViewController itself as proposed in #139 and #140/#141.

To do this work properly, we must consider:

  • Do we allow setting a new data source on PhotosViewController? If so, we must ensure the entire UI is updated appropriately. A lot of this setup is currently done during initialization, so this could be tricky.
  • When photos are added, removed, or changed, how is the PhotosViewController notified? Again, we must ensure the UI is updated properly & left in a consistent state.

(As an alternative to mutable data sources, a more functional approach could make sense and reduce the need for a complex notification/delegate relationship coupling these two objects; you'd set the data source to a new, immutable data source to make any change.)

cdzombak added a commit that referenced this issue Feb 29, 2016
Removed items are covered by these issues:

- Carthage support: #61
- Public data source: #163
@cdzombak
Copy link
Contributor Author

cdzombak commented Dec 9, 2016

This relates to #214, too. I'm thinking through the design for this now since many feature requests and PRs would benefit from a clearer idea of data flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant