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

IGListSingleSectionControllerDelegate selection function should include object #396

Closed
rnystrom opened this issue Jan 9, 2017 · 1 comment
Assignees
Milestone

Comments

@rnystrom
Copy link
Contributor

rnystrom commented Jan 9, 2017

Right now to get the object from the selectionDelegate, you have to:

func didSelect(_ sectionController: IGListSingleSectionController) {
  let object = adapter.object(for: sectionController)
  // do something
}

When IGListSingleSectionController already has the object, this lookup is wasteful.

I propose we change the delegate method to:

- (void)didSelectSingleSectionController:(IGListSingleSectionController *)sectionController 
  withObject:(id)object;
  • What do you think about the naming? "withObject" or maybe just "object"?
  • Should we shorten the method to just didSelectSectionController?
@Sherlouk
Copy link
Contributor

Sherlouk commented Jan 9, 2017

For the Swift interop it would be nice for something like didSelect(_ sectionController: .. with object: ..)

If no one else takes it, I may give this a try?

reminder

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

Successfully merging a pull request may close this issue.

3 participants