{"id":13355483,"url":"https://github.com/ivanvorobei/SPLarkController","last_synced_at":"2025-03-12T11:30:54.032Z","repository":{"id":42164259,"uuid":"172318888","full_name":"ivanvorobei/SPLarkController","owner":"ivanvorobei","description":"Custom transition between controllers. Settings controller for your iOS app.","archived":false,"fork":false,"pushed_at":"2022-03-27T17:48:29.000Z","size":4706,"stargazers_count":988,"open_issues_count":2,"forks_count":47,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-10-29T21:01:13.563Z","etag":null,"topics":["animation","controller","custom","gester","modal","settings","swift","transition","transitiondelegate","ui","uiviewcontroller","ux"],"latest_commit_sha":null,"homepage":"https://opensource.ivanvorobei.io","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/ivanvorobei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-24T09:28:05.000Z","updated_at":"2024-10-22T11:17:05.000Z","dependencies_parsed_at":"2022-08-31T14:00:49.040Z","dependency_job_id":null,"html_url":"https://github.com/ivanvorobei/SPLarkController","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanvorobei%2FSPLarkController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanvorobei%2FSPLarkController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanvorobei%2FSPLarkController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanvorobei%2FSPLarkController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivanvorobei","download_url":"https://codeload.github.com/ivanvorobei/SPLarkController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242882917,"owners_count":20200975,"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":["animation","controller","custom","gester","modal","settings","swift","transition","transitiondelegate","ui","uiviewcontroller","ux"],"created_at":"2024-07-29T21:02:19.537Z","updated_at":"2025-03-12T11:30:54.000Z","avatar_url":"https://github.com/ivanvorobei.png","language":"Swift","readme":"# SPLarkController\n\n\u003ca href=\"https://itunes.apple.com/app/id1453325619\" target=\"_blank\"\u003e\u003cimg align=\"left\" src=\"https://github.com/ivanvorobei/SPLarkController/blob/master/Resources/Preview.gif\" width=\"360\"/\u003e\u003c/a\u003e\n\n### About\nTransition between controllers to top. You can change animatable height after presentation controller. \n\nFor presentation and dismissing using custom transition delegate. \n\nYou can set any content to bottom controller, like buttons or even collection as in preview.\nFor implement settings as in preiew, see section [Settings Controller](https://github.com/ivanvorobei/SPLarkController#settings-controller).\n\nIf you like the project, don't forget to `put star ★`\u003cbr\u003eCheck out my other libraries:\n\n\u003cp float=\"left\"\u003e\n    \u003ca href=\"https://opensource.ivanvorobei.by\"\u003e\n        \u003cimg src=\"https://github.com/ivanvorobei/Readme/blob/main/Buttons/more-libraries.svg\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## Navigate\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n    - [Presenting](#presenting)\n    - [Height](#height)\n    - [Change height after presentation](#change-height)\n    - [Settings Controller](#settings-controller)\n    - [Snapshots](#snapshots)\n- [Other Projects](#other-projects)\n- [Russian Community](#russian-community)\n\n## Requirements\n\nSwift `4.2` \u0026 `5.0`. Ready for use on iOS 10+\n\n## Installation\n\n### Swift Package Manager\n\nThe [Swift Package Manager](https://swift.org/package-manager/) is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.\n\nTo integrate using Xcode 12, specify it in `File \u003e Swift Packages \u003e Add Package Dependency...`:\n\n```ogdl\nhttps://github.com/ivanvorobei/SPLarkController\n```\n\n### CocoaPods:\n\n[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate using CocoaPods, specify it in your `Podfile`:\n\n```ruby\npod 'SPLarkController'\n```\n\n### Manually\n\nIf you prefer not to use any of dependency managers, you can integrate manually. Put `Sources/ProjectName` folder in your Xcode project. Make sure to enable `Copy items if needed` and `Create groups`.\n\n## Usage\n\n### Presenting\n\nCreate controller and call func `presentAsLark`:\n\n```swift\nimport UIKit\nimport SPLarkController\n\nclass ViewController: UIViewController {\n    \n    override func viewDidAppear(_ animated: Bool) {\n        super.viewDidAppear(animated)\n\n        let controller = UIViewController()\n        self.presentAsLark(controller)\n    }\n}\n```\n\nIf you want customize controller (set custom height and other), create controller and set `transitioningDelegate` to `SPLarkTransitioningDelegate` object. Use `present` or `dismiss` functions:\n\n```swift\nlet controller = UIViewController()\nlet transitionDelegate = SPLarkTransitioningDelegate()\ncontroller.transitioningDelegate = transitionDelegate\ncontroller.modalPresentationStyle = .custom\ncontroller.modalPresentationCapturesStatusBarAppearance = true\nself.present(controller, animated: true, completion: nil)\n```\n\nPlease, do not init `SPLarkTransitioningDelegate` like this:\n\n```swift\ncontroller.transitioningDelegate = SPLarkTransitioningDelegate()\n```\n\nYou will get an error about weak property.\n\n### Height\n\nParameter `customHeight` sets custom height for modal controller. Default is `nil`:\n\n```swift\ntransitionDelegate.customHeight = 350\n```\n\n### Change Height\n\nFor change height after presenting use with code:\n\n```swift\nif let presentationController = self.presentationController as? SPLarkPresentationController {\n    presentationController.updateHeight(600)\n}\n```\n\nYou can see how it work in `Example` folder. I am plase ready-use project.\n\n### Settings Controller\n\nYou can simple implement settings controller as in preview. You need extend from `SPLarkSettingsController` and implement all methods for it. See class for more details.\n\n```swift\nclass SettingsController: SPLarkSettingsController {}\n```\n\n### Snapshots\n\nThe project uses a snapshot of the screen in order to avoid compatibility and customisation issues. Before controller presentation, a snapshot of the parent view is made, and size and position are changed for the snapshot. Sometimes you will need to update the screenshot of the parent view, for that use static func:\n\n```swift\nSPLarkController.updatePresentingController(modal: controller)\n```\n\nand pass the controller, which is modal and uses `SPLarkTransitioningDelegate`\n\n### Modal presentation of other controller\n\nIf you want to present modal controller on SPLarkController, please set:\n\n```swift\ncontroller.modalPresentationStyle = .custom\n```\n\nIt’s needed for correct presentation and dismissal of all modal controllers.\n\n## Other Projects\n\nI love being helpful. Here I have provided a list of libraries that I keep up to date. For see `video previews` of libraries without install open [opensource.ivanvorobei.by](https://opensource.ivanvorobei.by) website.\u003cbr\u003e\nI have libraries with native interface and managing permissions. Also available pack of useful extensions for boost your development process.\n\n\u003cp float=\"left\"\u003e\n    \u003ca href=\"https://opensource.ivanvorobei.by\"\u003e\n        \u003cimg src=\"https://github.com/ivanvorobei/Readme/blob/main/Buttons/more-libraries.svg\"\u003e\n    \u003c/a\u003e\n        \u003ca href=\"https://xcodeshop.ivanvorobei.by\"\u003e\n        \u003cimg src=\"https://github.com/ivanvorobei/Readme/blob/main/Buttons/xcode-shop.svg\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## Russian Community\n\nПодписывайся в телеграмм-канал, если хочешь получать уведомления о новых туториалах.\u003cbr\u003e\nСо сложными и непонятными задачами помогут в чате.\n\n\u003cp float=\"left\"\u003e\n    \u003ca href=\"https://tutorials.ivanvorobei.by/telegram/channel\"\u003e\n        \u003cimg src=\"https://github.com/ivanvorobei/Readme/blob/main/Buttons/open-telegram-channel.svg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://tutorials.ivanvorobei.by/telegram/chat\"\u003e\n        \u003cimg src=\"https://github.com/ivanvorobei/Readme/blob/main/Buttons/russian-community-chat.svg\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nВидео-туториалы выклыдываю на [YouTube](https://tutorials.ivanvorobei.by/youtube):\n\n[![Tutorials on YouTube](https://cdn.ivanvorobei.by/github/readme/youtube-preview.jpg)](https://tutorials.ivanvorobei.by/youtube)\n","funding_links":[],"categories":["Libs","Swift","Animation","UI [🔝](#readme)","Controllers Transition","Content"],"sub_categories":["UI","Menu"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanvorobei%2FSPLarkController","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivanvorobei%2FSPLarkController","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanvorobei%2FSPLarkController/lists"}