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

Keep selection #47

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Keep selection #47

wants to merge 3 commits into from

Conversation

renssies
Copy link
Contributor

Adds 2 options to TatsiConfig:

  • Keep selection while switching between albums
  • Supply pre-selected images when opening the picker, handy when you want to change the selection

I want to test this options first before merging into master.
If you have code feedback, please post it here.
If you have feedback about the feature, see #44.

@@ -87,6 +90,9 @@ public struct TatsiConfig {
LocalizableStrings.tableName = localizableStringsTableName
}
}

/// Set this to a number of PHAsset instances that were selected before the picker was opened.
public var preselectedAssets: [PHAsset]? = nil

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my suggestion is to declare this as an empty array like public var preselectedAssets = [PHAsset]() because that is the actual default behaviour, that none are preselected. nil as default does not have an extra meaning here over an empty array, I think.

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

Successfully merging this pull request may close these issues.

2 participants