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

Add KVO, Combine, and SwiftUI support #42

Merged

Conversation

SergeyKuryanov
Copy link
Contributor

Fixed #27

This PR adds KVO (for storyboards), Combine (simple publisher), and SwiftUI (Binding) support to the library. KVO support was not required by the initial issue, but it simplifies Combine implementation.

LaunchAtLoginwas changed from structure to singleton object. static isEnabled property was left for backward compatibility.

LaunchAtLogin/LaunchAtLogin.swift Outdated Show resolved Hide resolved
LaunchAtLogin/LaunchAtLogin.swift Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
LaunchAtLogin/LaunchAtLogin.swift Outdated Show resolved Hide resolved
LaunchAtLogin/LaunchAtLogin.swift Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

Thanks for working on this 🙌

LaunchAtLogin/LaunchAtLogin.swift Outdated Show resolved Hide resolved
LaunchAtLogin/LaunchAtLogin.swift Outdated Show resolved Hide resolved
LaunchAtLogin/LaunchAtLogin.swift Outdated Show resolved Hide resolved
LaunchAtLogin/LaunchAtLogin.swift Outdated Show resolved Hide resolved
LaunchAtLogin/LaunchAtLogin.swift Outdated Show resolved Hide resolved
LaunchAtLogin/LaunchAtLogin.swift Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
LaunchAtLogin/LaunchAtLogin.swift Outdated Show resolved Hide resolved
LaunchAtLogin/LaunchAtLogin.swift Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
LaunchAtLogin/LaunchAtLogin.swift Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

Have you tested that all this works in practice? For example, the Toggle view?

@sindresorhus
Copy link
Owner

>> #42 (comment) <<

@SergeyKuryanov
Copy link
Contributor Author

@sindresorhus sorry for missing this comment. Yes, I tested all possible scenarios of usage. Every toggle updates as expected.

@sindresorhus sindresorhus changed the title KVO, Combine and SwiftUI support Add KVO, Combine, and SwiftUI support Aug 2, 2020
@sindresorhus sindresorhus merged commit f7b255b into sindresorhus:master Aug 2, 2020
@sindresorhus
Copy link
Owner

Very nice work. Thanks :)

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.

SwiftUI and Combine support
2 participants