{"id":18031762,"url":"https://github.com/dagronf/dsfappkitbuilder","last_synced_at":"2025-10-30T09:35:46.111Z","repository":{"id":43460007,"uuid":"390161365","full_name":"dagronf/DSFAppKitBuilder","owner":"dagronf","description":"A SwiftUI-style DSL for AppKit (macOS)","archived":false,"fork":false,"pushed_at":"2024-04-24T02:47:05.000Z","size":916,"stargazers_count":39,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-04-25T00:59:17.519Z","etag":null,"topics":["appkit","macos","swift","swiftui"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dagronf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-28T00:08:02.000Z","updated_at":"2024-06-02T07:34:43.164Z","dependencies_parsed_at":"2024-06-02T07:34:31.520Z","dependency_job_id":"e6b36772-1075-4095-8bec-15694ff9bb96","html_url":"https://github.com/dagronf/DSFAppKitBuilder","commit_stats":{"total_commits":282,"total_committers":1,"mean_commits":282.0,"dds":0.0,"last_synced_commit":"209898d379c274321daaadd86167ada536c18b34"},"previous_names":[],"tags_count":93,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FDSFAppKitBuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FDSFAppKitBuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FDSFAppKitBuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FDSFAppKitBuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dagronf","download_url":"https://codeload.github.com/dagronf/DSFAppKitBuilder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245791341,"owners_count":20672665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appkit","macos","swift","swiftui"],"created_at":"2024-10-30T10:10:42.566Z","updated_at":"2025-10-30T09:35:41.061Z","avatar_url":"https://github.com/dagronf.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DSFAppKitBuilder\n\nA SwiftUI-style DSL for generating AppKit user interfaces.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/tag/dagronf/DSFAppKitBuilder\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/macOS-10.13+-red\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Swift-5.4-orange.svg\" /\u003e\n    \u003ca href=\"https://swift.org/package-manager\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/spm-compatible-brightgreen.svg?style=flat\" alt=\"Swift Package Manager\" /\u003e\u003c/a\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-lightgrey\" /\u003e\n\u003c/p\u003e\n\n## Why?\n\nI have a few apps that need to play nicely pre 10.15. Even in 10.15, SwiftUI can be a bit buggy.\n\nSometimes I have to play in AppKit code and it always struck me how much boilerplate code was required to get relatively straight-forward views to display nicely - especially with autolayout! NSStackView makes life easier for sure but it still can lead to very verbose and difficult-to-read code.  Even moreso - as a reviewer it can be VERY difficult to understand the intent of programatically generated AppKit code.\n\nSo I decided to make a SwiftUI-style builder DSL for AppKit views.  It has certainly made round-trip times faster for the projects I have that use it.\nYou can even use SwiftUI to preview your `DSFAppKitBuilder` views if you're targeting 10.15 and later.\n\n## TL;DL - Show me something!\n\nHere's an AppKit layout that is made a lot simpler with DSFAppKitBuilder\n\n```\n------------------------------------\n|         |  Name                  |\n|  image  |------------------------|\n|         |  Description           |\n------------------------------------\n```\n\n1. Image is fixed dimensions (42x42)\n2. Name is font size 24, which truncates if the view gets too small horizontally\n3. Description is font size 12, grey, and truncates if the view gets too small horizontally\n\nThis library provides a custom view controller `DSFAppKitBuilderViewController` which you can inherit from\nwhen building your own custom views.\n\n```swift\nclass IdentityViewController: DSFAppKitBuilderViewController {\n   // Build the view's body\n   override var viewBody: Element {\n      HStack(spacing: 4) {\n         ImageView()\n            .image(NSImage(named: \"apple_logo_orig\")!)               // The image\n            .size(width: 42, height: 42, priority: .required)        // fixed size\n         VStack(spacing: 2, alignment: .leading) {\n            Label(\"Apple Computer\")                                  // The label with title 'Name'\n               .font(NSFont.systemFont(ofSize: 24))                  // Font size 12\n               .lineBreakMode(.byTruncatingTail)                     // Truncate line\n               .horizontalPriorities(compressionResistance: 100)     // Allow the text field to compress\n            Label(\"This is the description that can be quite long\")  // The label with title 'Description'\n               .font(NSFont.systemFont(ofSize: 12))                  // Font size 12\n               .textColor(.placeholderTextColor)                     // Grey text\n               .lineBreakMode(.byTruncatingTail)                     // Truncate line\n               .horizontalPriorities(compressionResistance: 100)     // Allow the text field to compress\n         }\n      }\n   }\n}\n```\n\nAnd the result is...\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/dagronf/dagronf.github.io/master/art/projects/DSFAppKitBuilder/s1.png\" alt=\"Result image\" width=\"310\" /\u003e\n\u003c/p\u003e\n\nYou can find this demo in the `Demos/Simple AppKitBuilder Test` folder.\n\n## NOTES\n\n### This is NOT SwiftUI for AppKit!\n\nThis library is about _building_ appkit views. The view is built _once_ when the view object is constructed and the \nstructure of the constructed view hierarchy never changes beyond that point. \n\nThe difference with SwiftUI is that it rebuilds the view heirarchy constantly whenever it detects a change, allowing the\nview to radically change its hierarchy over its lifetime.\n\nYou can dynamically change views within an DSFAppKitBuilder view by binding to `isHidden` (for showing or hiding a subview),\nalong with binding to `isEnabled` to enable and disable controls.\n\nIf you need to be able to turn off/on subviews then bind to the `isHidden` property to conditionally show/hide\n\n```\nlet showBinder = ValueBinder(false)\nlazy var body: Element =\n   VStack {\n      Label(\"Apple\")\n      Label(\"label1: *some_condition* is true\")\n         .bindIsHidden(showBinder)\n      Label(\"label2: *some_condition* is false\")\n         .bindIsHidden(showBinder.toggled())\n   }\n}\n```\n\n## Generating your view\n\nThere are a number of methods for building and managing your view\n\n### DSFAppKitBuilderViewController\n\nThe `DSFAppKitBuilderViewController` is a custom NSViewController derived class which automatically\nhandles building and displaying your view.\n\nJust override `var viewBody: Element { ... }` in your subclass and you're ready to go!\n\n### DSFAppKitBuilderViewHandler protocol\n\nThe `DSFAppKitBuilderViewHandler` is a little lower level, allowing you to contain your view components\nwithin composable objects.\n\n```swift\nclass AppKitLayoutDemoContainer: NSObject, DSFAppKitBuilderViewHandler {\n   lazy var body: Element =\n      HStack(spacing: 4) {\n         ImageView()\n            .image(NSImage(named: \"apple_logo_orig\")!)           // The image\n            .size(width: 42, height: 42, priority: .required)    // fixed size\n         VStack(spacing: 2, alignment: .leading) {\n            Label(\"Apple Computer\")                              // The label with title 'Name'\n               .font(NSFont.systemFont(ofSize: 24))              // Font size 12\n               .lineBreakMode(.byTruncatingTail)                 // Truncate line\n               .horizontalPriorities(compressionResistance: 100) // Allow the text field to compress\n            Label(identityDescription)                           // The description label\n               .font(NSFont.systemFont(ofSize: 12))              // Font size 12\n               .textColor(.placeholderTextColor)                 // Grey text\n               .lineBreakMode(lineBreakMode)                     // Line break mode\n               .horizontalPriorities(compressionResistance: 250) // Allow the text field to wrap\n         }\n         .edgeInsets(6)\n      }\n      .edgeInsets(8)\n      .border(width: 0.75, color: .textColor)\n      .backgroundColor(.quaternaryLabelColor)\n      .cornerRadius(4)\n}\n```\n\nTo display the builder content, assign the container to an instance of `DSFAppKitBuilderView`\n\n```swift\nclass ViewController: NSViewController {\n   @IBOutlet weak var mainView: DSFAppKitBuilderView!\n   let identityContainer = AppKitLayoutDemoContainer()\n   override func viewDidLoad() {\n      super.viewDidLoad()\n      mainView.builder = self.identityContainer  // Set our builder as the view's builder\n   }\n}\n```\n\n### Composing your own element types\n\nIf you find that you use a particular grouping of elements over and over, you can create your own `Element` subclass which provides your custom layout as its own .\n\nFor example, in a form you may use the label:textfield pattern multiple times.\n\n```\n-------------------------------------\n|      Label | Text Field           |\n-------------------------------------\n|      Label | Text Field           |\n-------------------------------------\n|      Label | Text Field           |\n-------------------------------------\n```\n\nCreate a 'LabelTextPair' `Element` subclass that passes in the label text and a string ValueBinding…\n\n```swift\n/// An 'element' class which is a containerized eleement\nclass LabelTextFieldPair: Element {\n   let label: String\n   let textValueBinder: ValueBinder\u003cString\u003e\n   init(label: String, value: ValueBinder\u003cString\u003e) {\n      self.label = label\n      self.textValueBinder = value\n   }\n\n   // Override the view() call of the `Element` base class to provide the element's body\n   override func view() -\u003e NSView { return self.body.view() }\n\n   lazy var body: Element =\n      HStack(distribution: .fillProportionally) {\n         Label(self.label)\n            .font(NSFont.boldSystemFont(ofSize: NSFont.systemFontSize))\n            .alignment(.right)\n            .width(150)\n         TextField()\n            .bindText(updateOnEndEditingOnly: true, self.textValueBinder)\n            .horizontalPriorities(hugging: 10, compressionResistance: 10)\n      }\n}\n```\n\nThen use it in your code as you would a built-in element type!\n\n```swift\nlet nameBinder = ValueBinder\u003cString\u003e(\"\")\nlet usernameBinder = ValueBinder\u003cString\u003e(\"\")\nlet nicknameBinder = ValueBinder\u003cString\u003e(\"\")\n\nVStack {\n   LabelTextFieldPair(label: \"Name\", value: self.nameBinder)\n   LabelTextFieldPair(label: \"Username\", value: self.usernameBinder)\n   LabelTextFieldPair(label: \"Nickname\", value: self.nicknameBinder)\n}\n```\n\n### Basic read-only view\n\nYou can see this in action in the 'Simple AppKitBuilder Test' demo.\n\n## Behaviours\n\n### Modifiers\n\nModifiers allow you to change the default behaviour of an element.\n\n**Note:** Unlike SwiftUI modifiers, these modifiers return the original modified object, NOT a copy.\n\n```swift\nLabel(\"Name\")\n   .font(NSFont.systemFont(ofSize: 24))\n   .lineBreakMode(.byTruncatingTail)\n```\n\n### Actions\n\nYou can supply action blocks for many of the element types.\n\n```swift\nButton(title: \"Press Me!\") { [weak self] _ in\n  guard let `self` = self else { return }\n  Swift.print(\"You pressed it!\")\n}\nTextField(labelBinder)\n  .onAppear {\n    Swift.print(\"Label appeared in the window!\")  \n  }\n```\n\n### Binders\n\n#### ValueBinder\n\nA ValueBinder is a shared value container that allows a value to be shared amongst objects, and be notified if and when the value changes.\nThis is similar to the `@Binding` object in SwiftUI.\n\nYou will need to import `DSFValueBinders` to use a ValueBinder within your own code (it will be available to you via `DSFAppKitBuilder`)\n\n```swift\nimport DSFAppKitBuilder\nimport DSFValueBinders\n```\n\nYou can use the binders on an element to bind to a variable creating a two-way communication between element(s) and the controller.\n\nFor example, the following code holds the `userName` and `displayName` as member properties in a container class.\n\n* If the code changes `userName` (eg. `userName.wrappedValue = \"fish\"`) the UI will automatically update with the new value\n* If the user changes the value within the `TextField` on-screen, the ValueBinder will automatically reflect the changes\n\n```swift\nclass MyExcitingViewContainer: NSObject, DSFAppKitBuilderViewHandler {\n\n   // Bind the user name and the display name to fields\n   let userName = ValueBinder\u003cString\u003e(\"\")\n   let displayName = ValueBinder\u003cString\u003e(\"\")\n   \t\n   // The body of the view\n   lazy var body: Element =\n      VStack {\n         TextField()\n            .placeholderText(\"User Name\")\n            .bindText(self.userName)\n         TextField()\n            .placeholderText(\"Display Name\")\n            .bindText(self.displayName)\n      }\n}\n```\n\n#### ElementBinder\n\nSome elements (like Popovers) require additional information from the view hierarchy.  For example, a `Popover` needs to be told where to locate itself when it is displayed\n\nThis is where `ElementBinder` comes in. Similar to `ValueBinder`, the `ElementBinder` allows you to keep a reference to an element for later use.\n\n```swift\nclass MyController: NSObject, DSFAppKitBuilderViewHandler {\n   let popoverLocator = ElementBinder()\n   \n   lazy var popover: Popover = Popover {\n      Label(\"This is the content of the popup\")\n   }\n\n   lazy var body: Element =\n      Button(\"Show Popup\") { [weak self] _ in\n         guard \n            let `self` = self,\n            let element = self.popoverLocator.element \n         else {\n            return \n         }\n         self.popover.show(\n            relativeTo: element.bounds,\n            of: element,\n            preferredEdge: .maxY\n         )\n      }\n      .bindElement(self.popoverLocator)  // Store a reference to the button for later use\n}\n```\n\n### Autolayout helpers\n\n* Set the hugging and compression resistance on each element\n* Set a fixed width and/or height for an element\n\n```swift\nTextField()\n   .placeholderText(\"Noodles\")\n   .horizontalPriorities(hugging: 10)\n```\n\n### Controls\n\n| Element Type       |  Description            |\n|--------------------|-------------------------|\n| `Box`              | An `NSBox` wrapper      |\n| `Button`           | An `NSButton` wrapper   |\n| `FlatButton`       | A rounded `Button` with border color, fill colors  |\n| `CheckBox`         | An `NSButton` wrapper configured to display as a checkbox |\n| `ColorWell`        | An `NSColorWell` wrapper |\n| `ComboBox`         | An `NSComboBox` wrapper |\n| `ComboButton`      | An `NSComboButton` wrapper, falling back to [`DSFComboButton`](https://github.com/dagronf/DSFComboButton) on systems earlier than macOS 13 (Ventura) |\n| `DatePicker`       | An `NSDatePicker` wrapper |\n| `DisclosureView`   | An element has a title and a disclosable child element |\n| `HDivider`         | A horizontal divider element |\n| `VDivider`         | A vertical divider element |\n| `EmptyView`        | A spacer view |\n| `Group`            | A element that contains another element |\n| `Image`            | A simple view showing an image |\n| `ImageView`        | An `NSImageView` wrapper |\n| `Label`            | An `NSTextField` wrapper configured as a read-only label |\n| `LevelIndicator`   | An `NSLevelIndicator` wrapper |\n| `Link`             | An `NSTextField` displaying a read-only hyperlink |\n| `Pager`            | A pager control |\n| `PathControl`      | An `NSPathControl` wrapper |\n| `PopupButton`      | An `NSPopupButton` wrapper |\n| `ProgressBar`      | An `NSProgressIndicator` wrapper |\n| `RadioGroup`       | A grouped stack of buttons configured as a radio group |\n| `ScrollView`       | An `NSScrollView` wrapper |\n| `SearchField`      | An `NSSearchField` wrapper |\n| `SecureTextField`  | An `NSSecureTextField` wrapper |\n| `Segmented`        | An `NSSegmentedControl` wrapper |\n| `Shape`            | A view that displays a CGPath |\n| `Slider`           | An `NSSlider` wrapper |\n| `Stepper`          | An `NSStepper` wrapper |\n| `Switch`           | An `NSSwitch` wrapper |\n| `TextField`        | An `NSTextField` wrapper configured as an editable field |\n| `Toggle`           | A scalable toggle button (uses [DSFToggleButton](https://github.com/dagronf/DSFToggleButton)) |\n| `TokenField`       | A wrapper around `NSTokenField` |\n| `View`             | A wrapper for any `NSView` instance |\n| `VisualEffectView` | A wrapper for a `NSVisualEffectView` instance containing a child element |\n| `Window`           | An `NSWindow` wrapper |\n\n### Collection elements\n\n| Element Type       |  Description            |\n|--------------------|-------------------------|\n| `DisclosureGroup`  | An element that is a collection of `DisclosureView` elements |\n| `DynamicElement`   | A hot-swappable element which displays the view contained in a `ValueBinder` |\n| `Flow`             | An element that is a collection of elements that flow across, then down |\n| `Form`             | An element that simulates a Form |\n| `Grid`             | An `NSGridView` wrapper |\n| `List`             | A 'list' style element which builds its content from an array of elements and dynamically updates its content as the array of elements change |\n| `HStack`           | A horizontal stack    |\n| `VStack`           | A vertical stack      |\n| `ZStack`           | Layer multiple Elements on top of each other |\n| `TabView`          | An `NSTabView` wrapper |\n| `SplitView`        | An `NSSplitView` wrapper |\n\n### Branching and choice elements\n\n| Element Type        |  Description            |\n|---------------------|-------------------------|\n| `Maybe`             | An element that inserts an element into the view IF a condition is met |\n| `OneOf`             | An element that binds the visibility of a number of elements to a `ValueBinder\u003c\u003e` value |\n| `DynamicElement`    | An element that binds the displayed Element to a `ValueBinder\u003c\u003e` |\n\n### Alerts, popovers and sheets\n\n#### Alert example\n\n```swift\nlet _alertVisible = ValueBinder(false)\nfunc alertBuilder() -\u003e NSAlert {\n   let a = NSAlert()\n   a.messageText = \"Delete the document?\"\n   a.informativeText = \"Are you sure you would like to delete the document?\"\n   a.addButton(withTitle: \"Cancel\")\n   a.addButton(withTitle: \"Delete\")\n   a.alertStyle = .warning\n   return a\n}\n…\n   Button(title: \"Display an alert\") { [weak self] _ in\n      self?._alertVisible.wrappedValue = true\n   }\n   .alert(\n      isVisible: self._alertVisible,\n      alertBuilder: self.alertBuilder\n   )\n```\n\n#### Popover example\n\n```swift\nlet _popoverVisible = ValueBinder(false)\n…\n   Button(title: \"Display a popover\") { [weak self] _ in\n      self?._popoverVisible.wrappedValue = true\n   }\n   .popover(\n      isVisible: self._popoverVisible,\n      preferredEdge: .maxY,\n      {\n         // Content for the sheet goes here \n         Label(\"Content here\") \n      }\n   )\n```\n\n#### Sheet example\n\n```swift\nlet _sheetVisible = ValueBinder(false)\n…\n   Button(title: \"Show sheet\") { [weak self] _ in\n      self?._sheetVisible.wrappedValue = true\n   }\n   .sheet(\n      isVisible: self._sheetVisible,\n      {\n         // Content for the sheet goes here \n         Label(\"Content here\") \n      }\n   )\n```\n\n\n## Using SwiftUI previews\n\nYou can preview your `DSFAppKitBuilder` creations using the SwiftUI previews if your app is targeting 10.15 and later.\n\nThe following types provide a `.SwiftUIPreview()` method call which returns a SwiftUI wrapped presentation of your\n`DSFAppKitBuilder` view.  \n\n* `Element`\n* `DSFAppKitBuilderViewController`\n* `DSFAppKitBuilderViewHandler`\n\n\u003cdetails\u003e\n\u003csummary\u003eShow an example of using SwiftUI to generate a preview\u003c/summary\u003e\n\n```swift\n@available(macOS 10.15, *)\nclass IdentityViewController: DSFAppKitBuilderViewController {\n   // Build the view's body\n   override var viewBody: Element {\n      HStack(spacing: 4) {\n         ImageView()\n            .image(NSImage(named: \"apple_logo_orig\")!)               // The image\n            .size(width: 42, height: 42, priority: .required)        // fixed size\n         VStack(spacing: 2, alignment: .leading) {\n            Label(\"Apple Computer\")                                  // The label with title 'Name'\n               .font(NSFont.systemFont(ofSize: 24))                  // Font size 12\n               .lineBreakMode(.byTruncatingTail)                     // Truncate line\n               .horizontalPriorities(compressionResistance: 100)     // Allow the text field to compress\n            Label(\"This is the description that can be quite long\")  // The label with title 'Description'\n               .font(NSFont.systemFont(ofSize: 12))                  // Font size 12\n               .textColor(.placeholderTextColor)                     // Grey text\n               .lineBreakMode(.byTruncatingTail)                     // Truncate line\n               .horizontalPriorities(compressionResistance: 100)     // Allow the text field to compress\n         }\n      }\n   }\n}\n\n#if canImport(SwiftUI)\nimport SwiftUI\n@available(macOS 10.15, *)\nstruct IdentityViewPreview: PreviewProvider {\n   static var previews: some SwiftUI.View {\n      IdentityViewController()\n         .SwiftUIPreview()\n         .frame(width: 280, height: 60)\n         .padding()\n   }\n}\n#endif\n\n```\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://raw.githubusercontent.com/dagronf/dagronf.github.io/master/art/projects/DSFAppKitBuilder/swiftui-preview.jpg\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/dagronf/dagronf.github.io/master/art/projects/DSFAppKitBuilder/swiftui-preview.jpg\" alt=\"SwiftUI preview image\" width=\"400\" /\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n\u003c/details\u003e\n\n\n## Avoiding Retain Cycles\n\nAny time a block is provided to either a `ValueBinder` or an `Element`, if the block captures `self` it is important to make sure that you capture `self` either `weak` or `unowned`.\n\n```swift\nlet resetEnabled = ValueBinder\u003cBool\u003e(false)\n\n/// The following binder captures self, which will mean that the element that it is bound to will leak\nlazy var badTextBinder = ValueBinder(\"The initial value\") { newValue in\n\tself.resetEnabled.wrappedValue = !newValue.isEmpty\n}\n\n/// The following binder captures self weakly, which means that self is no longer in a retain cycle\nlazy var goodTextBinder = ValueBinder(\"The initial value\") { [weak self] newValue in\n\tself?.resetEnabled.wrappedValue = !newValue.isEmpty\n}\n\n...\n\nTextField()\n  .bindText(self.badTextBinder)    // \u003c- Text field will leak as self is captured in a retain cycle\n```\n\nIf you believe you have a leak, you can set `DSFAppKitBuilderShowDebuggingOutput = true` to report element deinit calls in the debugger output pane.\n\n## Integration\n\n### Swift package manager\n\nAdd `https://github.com/dagronf/DSFAppKitBuilder` to your project.\n\n## Documentation\n\nThe code is documented and will produce nice documentation for each element when run through [`jazzy`](https://github.com/realm/jazzy) or similar documentation generator tools.\n\n### Using swift doc\n`\u003e swift doc generate  --module-name DSFAppKitBuilder --output docs .`\n\n### Using jazzy\n`\u003e jazzy`\n\n## Known bugs\n\n* `SplitView` needs to be a top-level object. They REALLY don't like playing in an autolayout container (eg. embedding a splitview inside a stackview)\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2024 Darren Ford\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdagronf%2Fdsfappkitbuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdagronf%2Fdsfappkitbuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdagronf%2Fdsfappkitbuilder/lists"}