{"id":20704724,"url":"https://github.com/bawn/aquaman","last_synced_at":"2025-04-09T20:05:33.886Z","repository":{"id":53951507,"uuid":"165251201","full_name":"bawn/Aquaman","owner":"bawn","description":"A pure-Swift library for nested display of horizontal and vertical scrolling views","archived":false,"fork":false,"pushed_at":"2021-07-28T05:31:48.000Z","size":2756,"stargazers_count":271,"open_issues_count":2,"forks_count":42,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-09T20:05:29.315Z","etag":null,"topics":["menuview","nestedscrollview","page","pageviewcontroller","scrollview","swift","swift-framework","swift-library","vertical-scrolling-views"],"latest_commit_sha":null,"homepage":"https://bawn.github.io/#blog","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/bawn.png","metadata":{"files":{"readme":"README-EN.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":"2019-01-11T13:50:19.000Z","updated_at":"2025-04-02T11:10:51.000Z","dependencies_parsed_at":"2022-08-13T05:20:12.552Z","dependency_job_id":null,"html_url":"https://github.com/bawn/Aquaman","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bawn%2FAquaman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bawn%2FAquaman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bawn%2FAquaman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bawn%2FAquaman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bawn","download_url":"https://codeload.github.com/bawn/Aquaman/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103872,"owners_count":21048245,"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":["menuview","nestedscrollview","page","pageviewcontroller","scrollview","swift","swift-framework","swift-library","vertical-scrolling-views"],"created_at":"2024-11-17T01:14:30.976Z","updated_at":"2025-04-09T20:05:33.852Z","avatar_url":"https://github.com/bawn.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aquaman\n\n![License MIT](https://img.shields.io/dub/l/vibe-d.svg)\n![Pod version](http://img.shields.io/cocoapods/v/Aquaman.svg?style=flat)\n![Platform info](http://img.shields.io/cocoapods/p/LCNetwork.svg?style=flat)\n[![Support](https://img.shields.io/badge/support-iOS9.0+-blue.svg?style=flat)](https://www.apple.com/nl/ios/)\n[![Swift 4.2](https://camo.githubusercontent.com/cc157628e33009bbb18f6e476955a0f641f407d9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53776966742d342e322d6f72616e67652e7376673f7374796c653d666c6174)](https://developer.apple.com/swift/)\n\nA pure-Swift library for nested display of horizontal and vertical scrolling views.\n\n![demo](./demo.gif)\n\n## Requirements\n\n- iOS 9.0+ \n- Swift 4.2+\n- Xcode 10+\n\n\n\n## Installation\n\n#### [CocoaPods](http://cocoapods.org/) (recommended)\n\n```\nuse_frameworks!\n\npod 'Aquaman'\n```\n\n## Usage\n\nFirst make sure to import the framework:\n\n```\nimport Aquaman\n```\n\nBasically, we just need to provide the list of child view controllers to show. Then call some necessary methods.\n\nLet's see the steps to do this:\n\n#### Create a AquamanPageViewController subclass\n\n```swift\nimport Aquaman\n\nclass PageViewController: AquamanPageViewController {\n  // ...\n}\n```\n\n#### Provide the view controllers that will appear embedded into the AquamanPageViewController\n\n```swift\noverride func numberOfViewControllers(in pageController: AquamanPageViewController) -\u003e Int {\n    return count\n}\n    \noverride func pageController(_ pageController: AquamanPageViewController, viewControllerAt index: Int) -\u003e (UIViewController \u0026 AquamanChildViewController) {\n    // ...\n    return viewController\n}\n    \n```\n\nEvery UIViewController that will appear within the AquamanPageViewController should conform to `AquamanChildViewController` by implementing `func aquamanChildScrollView() -\u003e UIScrollView` \n\n```swift\nimport Aquaman\nclass ChildViewController: UIViewController, AquamanChildViewController {\n\n    @IBOutlet weak var tableView: UITableView!\n    func aquamanChildScrollView() -\u003e UIScrollView {\n        return tableView\n    }\n    // ...\n}\n```\n\n\n\n#### Provide the headerView and headerView height \n\n```swift\noverride func headerViewFor(_ pageController: AquamanPageViewController) -\u003e UIView {\n    return HeaderView()\n}\n\noverride func headerViewHeightFor(_ pageController: AquamanPageViewController) -\u003e CGFloat {\n    return headerViewHeight\n}\n```\n\n#### Provide the menuView and menuView height\n\n```swift\noverride func menuViewFor(_ pageController: AquamanPageViewController) -\u003e UIView {\n    return menuView\n}\n\noverride func menuViewHeightFor(_ pageController: AquamanPageViewController) -\u003e CGFloat {\n    return menuViewHeight\n}\n```\n\n#### Update menuView's layout when content scroll view did scroll and check state when viewController did end isplay\n\n```swift\noverride func pageController(_ pageController: AquamanPageViewController, contentScrollViewDidScroll scrollView: UIScrollView) {\n    menuView.updateLayout(scrollView)\n}\n\noverride func pageController(_ pageController: AquamanPageViewController, didDisplay viewController: (UIViewController \u0026 AquamanChildViewController), forItemAt index: Int) {\n        menuView.checkState(animation: true)\n}\n```\n\n\n\n## Examples\n\nFollow these 4 steps to run Example project: \n\n1. Clone Aquaman repository\n2. Run the `pod install` command \n3. Open Aquaman workspace \n4. Run the Aquaman-Demo project.\n\n### License\n\nAquaman is released under the MIT license. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbawn%2Faquaman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbawn%2Faquaman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbawn%2Faquaman/lists"}