Swiftpack.co - Package - sindresorhus/Preferences

404: Not Found

Github

link
Stars: 581
Help us keep the lights on

Dependencies

Used By

Total: 0

Releases

v1.0.0 - Nov 1, 2019

This package is now considered stable.

  • Upgrade to Swift 5.1 https://github.com/sindresorhus/Preferences/commit/b999a0a0845afbc2a5d30c825c2e4d788a4b869e
  • Lower the minimum required macOS version from 10.12 to 10.10 https://github.com/sindresorhus/Preferences/commit/669fc93c7092d70ebb8b52b82000765731fe63ab

v0.4.1 - Jul 6, 2019

  • Fix window-restoration https://github.com/sindresorhus/Preferences/commit/cc25d58a9ec379812fc8f2fd7ba48f3d35b4cbff
  • Fix transition animation bug on macOS 10.13 and earlier https://github.com/sindresorhus/Preferences/commit/6b4496567e65c36b00171899c168dcd4124d7236

v0.4.0 - Jun 14, 2019

Fixes

  • Fix automatic localization of "Preferences" in the window title when there's only one preference pane. https://github.com/sindresorhus/Preferences/commit/18f009cb0b7f97ed1ce3a7d5e3b858519f3197f8

v0.3.0 - May 14, 2019

Screen Shot 2019-05-14 at 15 48 49

The main feature of this release is a segmented control style. We have also considerably improved the API and codebase.

Breaking

  • The Preferenceable protocol was renamed to PreferencePane
  • The required toolbarItemTitle property was renamed to preferencePaneTitle
  • You now have to provide a preferencePaneIdentifier property in your view controller
  • Remove .hideWindow() in favor of NSWindowController#close() (#21) d9ad07c
  • The PreferencesWindowController viewControllers parameter was renamed to preferencePanes
  • The .showWindow() method was renamed to .show() and you can now optionally pass in which preference pane to show

Migrating a view controller:

+extension PreferencePane.Identifier {
+	static let general = Identifier("general")
+}

-final class GeneralPreferenceViewController: NSViewController, Preferenceable {
+final class GeneralPreferenceViewController: NSViewController, PreferencePane {
+	let preferencePaneIdentifier = PreferencePane.Identifier.general
-	let toolbarItemTitle = "General"
+	let preferencePaneTitle = "General"
 	let toolbarItemIcon = NSImage(named: NSImage.preferencesGeneralName)!
 	// …

Enhancements

  • Add segmented control style (#6) 3b62df8 (See the readme for example)
  • Use the preference pane title as window title (#19) 891d9df To better align with the macOS Human Interface Guidelines.
  • Restore active preference when reopening window (#26) 2bb3fc7
  • Add option to hide the toolbar when there's one or less items (#25) 27f4b3e
  • Upgrade to Swift 5 e0ef252

Known issues

  • It doesn't show the Preferences window if you're not using auto-layout for your view controllers. It's being worked on in #28. Temporary workaround.
  • It doesn't correctly localize the window title when there's only one tab. It's being worked on in #24.

Meta

  • Welcome @DivineDominion as a maintainer 🎉

v0.2.1 - Jan 2, 2019

  • Fix Gatekeeper validation errors when distributing apps (#7) https://github.com/sindresorhus/Preferences/commit/998120b432812bc4fee67c7da23ce1103b970ad6