{"id":18087608,"url":"https://github.com/aheze/splitsheet","last_synced_at":"2025-08-18T08:05:44.889Z","repository":{"id":48241819,"uuid":"500166871","full_name":"aheze/SplitSheet","owner":"aheze","description":"A lightweight, fully interactive split-screen sheet.","archived":false,"fork":false,"pushed_at":"2022-11-08T03:30:43.000Z","size":20100,"stargazers_count":190,"open_issues_count":2,"forks_count":7,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-08T09:51:56.585Z","etag":null,"topics":["ios","scrollview","sheet","split-screen","swift","uikit"],"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/aheze.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}},"created_at":"2022-06-05T17:35:05.000Z","updated_at":"2025-01-27T12:08:59.000Z","dependencies_parsed_at":"2023-01-22T22:00:30.134Z","dependency_job_id":null,"html_url":"https://github.com/aheze/SplitSheet","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/aheze/SplitSheet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aheze%2FSplitSheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aheze%2FSplitSheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aheze%2FSplitSheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aheze%2FSplitSheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aheze","download_url":"https://codeload.github.com/aheze/SplitSheet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aheze%2FSplitSheet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270962391,"owners_count":24675965,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ios","scrollview","sheet","split-screen","swift","uikit"],"created_at":"2024-10-31T17:04:37.554Z","updated_at":"2025-08-18T08:05:44.862Z","avatar_url":"https://github.com/aheze.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SplitSheet\n\n![Header Image](Assets/Header.png)\n\nA lightweight, fully interactive split-screen sheet.\n\n- Powered by `UIScrollView` for super-smooth gestures.\n- Show/hide either programmatically or with a swipe gesture.\n- Gestures are fully interruptible.\n- Won't affect buttons and gestures nested in subviews.\n- Supports sizing detents (hidden, shown, expanded).\n- Fully compatible with Auto Layout self-sizing.\n- Super simple, no dependencies, ~300 lines of code.\n- Replicates iOS 15's sheet detents while supporting iOS 9+.\n\n### Showcase\n\n| ![Click to show sheet](Assets/Click.gif) | ![Swipe between sheet detents](Assets/Detents.gif) | ![Overlay the sheet without displacing main content](Assets/Overlay.gif) |\n|---|---|---|\n\n\n### Installation\nRequires iOS 9+. SplitSheet can be installed through the [Swift Package Manager](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) (recommended) or manually.\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\u003cstrong\u003e\nSwift Package Manager\n\u003c/strong\u003e\n\u003cbr\u003e\nAdd the Package URL:\n\u003c/td\u003e\n\u003ctd\u003e\n\u003cstrong\u003e\nManual\n\u003c/strong\u003e\n\u003cbr\u003e\nDrag \u003ca href=\"https://github.com/aheze/SplitSheet/blob/main/Sources/SplitSheet.swift\"\u003ethis file\u003c/a\u003e into your project:\n\u003c/td\u003e\n\u003c/tr\u003e\n  \n\u003ctr\u003e\n\u003ctd\u003e\n\u003cbr\u003e\n\n```\nhttps://github.com/aheze/SplitSheet\n```\n\u003c/td\u003e\n\u003ctd\u003e\n\u003cbr\u003e\n\n```\nSources/SplitSheet.swift\n```\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\n### Usage\n\n```swift\nimport Combine\nimport SplitSheet\nimport UIKit\n\nclass ViewController: UIViewController {\n\n    /// Works with any view controller.\n    let mainViewController = MainViewController()\n    let sheetViewController = SheetViewController()\n    lazy var splitSheetController = SplitSheetController(\n        mainViewController: mainViewController,\n        sheetViewController: sheetViewController\n    )\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n        /// If true, `mainViewController` will shift up as the sheet is shown.\n        splitSheetController.displaceContent = true\n\n        /// Show a grabber handle.\n        splitSheetController.showHandle = true\n\n        /// The minimum sheet height.\n        splitSheetController.minimumSheetHeight = CGFloat(400)\n\n        /// When the sheet is shown and dragged within this limit, the sheet will bounce back.\n        splitSheetController.snappingDistance = CGFloat(150)\n\n        /// How long the show/hide animation takes.\n        splitSheetController.animationDuration = CGFloat(0.6)\n\n        /// If swiping up to show the sheet is allowed or not.\n        splitSheetController.swipeUpToShowAllowed = true\n\n        /// Override the status bar color.\n        splitSheetController.statusBarStyle = UIStatusBarStyle.default\n        \n        /// Add the sheet.\n        embed(splitSheetController, inside: view)\n    }\n\n    override func viewDidAppear(_ animated: Bool) {\n        super.viewDidAppear(animated)\n\n        /// Show the sheet programmatically.\n        splitSheetController.show(true)\n    }\n\n    /// Propagate `splitSheetController`'s custom status bar to this view controller.\n    override var childForStatusBarStyle: UIViewController? {\n        return splitSheetController\n    }\n}\n```\n\n### Self-Sizing and Detents\nIt's simple — if your sheet view controller's intrinsic size is larger than the `minimumSheetHeight`, a \"large\" detent will be added.\n\n```swift\nclass SheetViewController: UIViewController {\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \n        view.backgroundColor = .systemTeal\n        view.heightAnchor.constraint(equalToConstant: 800).isActive = true\n    }\n}\n```\n\n\u003cimg src=\"Assets/SelfSizing.gif\" width=\"250\" alt=\"Hidden, shown, and expanded modes.\"\u003e\n\n\nAuthor | Contributing | Need Help?\n--- | --- | ---\nSplitSheet is made by [aheze](https://github.com/aheze). | All contributions are welcome. Just [fork](https://github.com/aheze/SplitSheet/fork) the repo, then make a pull request. | Open an [issue](https://github.com/aheze/SplitSheet/issues) or join the [Discord server](https://discord.com/invite/Pmq8fYcus2). You can also ping me on [Twitter](https://twitter.com/aheze0). Or read the source code — there's lots of comments.\n\n### Apps Using SplitSheet\n\n[Find](http://getfind.app) is an app for finding your photos. SplitSheet is used for the photo gallery view and info sheet — download to check it out!\n\n\u003ca href=\"http://getfind.app\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/aheze/OpenFind/main/Assets/v3%20Thumbnail.jpg\" height=\"300\" alt=\"Find App\"\u003e\n\u003c/a\u003e\n\nIf you have an app that uses SplitSheet, just make a PR or [message me](https://twitter.com/aheze0).\n\n### License\n\n```\nMIT License\n\nCopyright (c) 2022 A. Zheng\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%2Faheze%2Fsplitsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faheze%2Fsplitsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faheze%2Fsplitsheet/lists"}