{"id":18031742,"url":"https://github.com/dagronf/dsfinspectorpanes","last_synced_at":"2025-03-27T05:30:57.656Z","repository":{"id":63907293,"uuid":"186102765","full_name":"dagronf/DSFInspectorPanes","owner":"dagronf","description":"Easily customisable, scrollable, collapsible inspector panels using nested NSView(s)","archived":false,"fork":false,"pushed_at":"2024-07-22T22:02:50.000Z","size":258,"stargazers_count":23,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-20T10:18:36.719Z","etag":null,"topics":["apple-pages-inspectors","inspector","macos","nsview","objective-c","pane","properties","swift"],"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":"2019-05-11T07:39:30.000Z","updated_at":"2025-02-14T23:22:50.000Z","dependencies_parsed_at":"2024-07-23T01:40:54.166Z","dependency_job_id":"a8feec4a-eee9-45d9-b8a8-5563119d37d4","html_url":"https://github.com/dagronf/DSFInspectorPanes","commit_stats":{"total_commits":42,"total_committers":1,"mean_commits":42.0,"dds":0.0,"last_synced_commit":"0ed3e65896fab0e810084969a2c356e5d70e072f"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FDSFInspectorPanes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FDSFInspectorPanes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FDSFInspectorPanes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FDSFInspectorPanes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dagronf","download_url":"https://codeload.github.com/dagronf/DSFInspectorPanes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245791338,"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":["apple-pages-inspectors","inspector","macos","nsview","objective-c","pane","properties","swift"],"created_at":"2024-10-30T10:10:38.356Z","updated_at":"2025-03-27T05:30:56.509Z","avatar_url":"https://github.com/dagronf.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inspector Panes for macOS\n\n![](https://dagronf.github.io/art/projects/DSFPropertyPanes/screenshot.jpg)\n\n![](https://img.shields.io/github/v/tag/dagronf/DSFInspectorPanes)\n![](https://img.shields.io/badge/macOS-10.13+-red)\n\n![](https://img.shields.io/badge/License-MIT-lightgrey) \n[![](https://img.shields.io/badge/pod-compatible-informational)](https://cocoapods.org) \n[![](https://img.shields.io/badge/spm-compatible-brightgreen.svg?style=flat)](https://swift.org/package-manager)\n\nA Cocoa, auto-layout managed view to build and manage inspector panes equivalent to the inspectors in Apple's Pages and Numbers applications.\n\n## Why?\n\nI've implemented and fought with this on a number of different projects and decided to make a drop-in class that would do everything that I wanted. This class is fully autolayout managed.\n\nI really like Apple 'Pages' implementation which allows having a header view which can be used to configure items even when the pane itself is hidden.  A good example of this is the 'Spacing' inspector pane, where when the pane is hidden the user can still change the line spacing at a lower granularity.\n\n| Expanded | Contracted |\n|-----|-----|\n| ![](https://dagronf.github.io/art/projects/DSFPropertyPanes/pane_expanded.png) | ![](https://dagronf.github.io/art/projects/DSFPropertyPanes/pane_contracted.png) |\n\n## Features\n\n* Show and hide panes\n* Configurable from interface builder as inspectables\n* Optional supply a view as a header view, and set its visibility (always show, show when collapsed)\n* Optional automatic scroll view support\n* Optional animation\n* Optional separators or bounding boxes\n* Optional drag/drop reordering of panes\n* Show or hide individual panes without removing them\n* Expand or contract individual panes\n\n# Installation\n\n## Direct\n\nCopy the swift files from the `DSFInspectorPanes` subfolder to your project\n\n## CocoaPods\n\nAdd the following to your `Podfiles` file\n\n```ruby\npod 'DSFInspectorPanes', :git =\u003e 'https://github.com/dagronf/DSFInspectorPanes'\n```\n\n# API\n\n## Create\n\n1. Create an instance of `DSFInspectorPanesView` and add it to a view, or\n2. Use Interface Builder to add a custom view, and change the class to `DSFInspectorPanesView`\n\n## Properties\n\n* `animated` : Animate the expanding/hiding of the panes\n* `embeddedInScrollView` : Embed the panes view in a scroll view\n* `showSeparators` : Insert a separator between each pane (optional)\n* `showBoxes` : Show a box around each inspector pane (optional)\n* `titleFont` : Specify a custom font to use for the title for the panes\n* `spacing` : Set the vertical spacing between each pane\n* `canDragRearrange` : Allow the user to change the ordering of the panes via drag/drop or touchbar\n\n## Methods\n\n### Add an inspector pane\n\nAdd a new inspector pane to the container\n\n```swift\nvar propertyPanes = DSFInspectorPanesView(\n   frame: .zero,\n   animated: true,\n   embeddedInScrollView: false,\n   titleFont: NSFont.systemFont(ofSize: 13)\n)\n\nvar inspectorView = NSView()        // \u003c--- your inspector pane view\nvar inspectorHeaderView = NSView()  // \u003c--- your inspector pane header view\n\t\npropertyPanes.addPane(\n   title: \"My inspector Pane\", \n   view: inspectorView,\n   headerAccessoryView: inspectorHeaderView,\n   expansionType: .expanded)\n}\n```\n\n## Expand an existing pane\n\n```swift\nvar propertyPanes = DSFInspectorPanesView()\n…\npropertyPanes.panes[0].expanded = true\npropertyPanes.panes[1].expanded = false\n```\n## Show or hide a pane\n\n```swift\nvar propertyPanes = DSFInspectorPanesView()\n…\npropertyPanes.panes[0].isHidden = true\npropertyPanes.panes[1].isHidden = false\n```\n\n## Reordering and moving\n\nMove the property pane at index 0 to index 4\n\n```swift\npropertyPanes.move(index: 0, to: 4)\n```\n\nSwap property panes at index 0 and index 4\n\n```swift\npropertyPanes.swap(index: 0, with: 4)\n```\n\n## Removing\nRemove the pane at index 1\n\n```swift\npropertyPanes.remove(at: 1)\n```\n\nRemove all panes\n\n```swift\npropertyPanes.removeAll()\n```\n\n# Thanks\n\n### RSVerticallyCenteredTextFieldCell - Red Sweater Software\n* Red Sweater Software, LLC for [RSVerticallyCenteredTextFieldCell](http://www.red-sweater.com/blog/148/what-a-difference-a-cell-makes) component  — [License](http://opensource.org/licenses/mit-license.php)\n\n### DraggableStackView - Mark Onyschuk\n* Mark Onyschuk on [GitHub](https://github.com/monyschuk) -- [Draggable Stack View](https://gist.github.com/monyschuk/cbca3582b6b996ab54c32e2d7eceaf25)\n\n# Screenshots\n\n[(Movie) Drag Drop Reordering](https://dagronf.github.io/art/projects/DSFPropertyPanes/drag_drop_reorder.mp4)\n\n## Interface Builder integration\n\n![](https://dagronf.github.io/art/projects/DSFPropertyPanes/inspector_pane_ibdesignable.jpg) \n\n## Pane modes\n\nShowing the ability to display a secondary UI element for when the pane is contracted\n\n![](https://dagronf.github.io/art/projects/DSFPropertyPanes/expand_contract.gif) \n  \n# License\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%2Fdsfinspectorpanes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdagronf%2Fdsfinspectorpanes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdagronf%2Fdsfinspectorpanes/lists"}