Latest 0.0.4
License MIT
Platforms ios 9.0, requires ARC

License MIT
Pod version
Platform info
Swift 4.2

A pure-Swift library for nested display of horizontal and vertical scrolling views.



  • iOS 9.0+
  • Swift 4.2+
  • Xcode 10+


CocoaPods (recommended)


pod 'Aquaman'



First make sure to import the framework:

import Aquaman

Basically, we just need to provide the list of child view controllers to show. Then call some necessary methods.

Let’s see the steps to do this:

Create a AquamanPageViewController subclass

import Aquaman

class PageViewController: AquamanPageViewController {
  // ...

Provide the view controllers that will appear embedded into the AquamanPageViewController

override func numberOfViewControllers(in pageController: AquamanPageViewController) -> Int {
    return count

override func pageController(_ pageController: AquamanPageViewController, viewControllerAt index: Int) -> (UIViewController & AquamanChildViewController) {
    // ...
    return viewController

Every UIViewController that will appear within the AquamanPageViewController should conform to AquamanChildViewController by implementing func aquamanChildScrollView() -> UIScrollView

import Aquaman
class ChildViewController: UIViewController, AquamanChildViewController {

    @IBOutlet weak var tableView: UITableView!
    func aquamanChildScrollView() -> UIScrollView {
        return tableView
    // ...

Provide the headerView and headerView height

override func headerViewFor(_ pageController: AquamanPageViewController) -> UIView {
    return HeaderView()

override func headerViewHeightFor(_ pageController: AquamanPageViewController) -> CGFloat {
    return headerViewHeight

Provide the menuView and menuView height

override func menuViewFor(_ pageController: AquamanPageViewController) -> UIView {
    return menuView

override func menuViewHeightFor(_ pageController: AquamanPageViewController) -> CGFloat {
    return menuViewHeight

Update menuView’s layout when content scroll view did scroll and check state when did end scoll

override func pageController(_ pageController: AquamanPageViewController, contentScrollViewDidScroll scrollView: UIScrollView) {

override func pageController(_ pageController: AquamanPageViewController,
                             contentScrollViewDidEndScroll scrollView: UIScrollView) {


Follow these 4 steps to run Example project:

  1. Clone Aquaman repository
  2. Run the pod install command
  3. Open Aquaman workspace
  4. Run the Aquaman-Demo project.


Aquaman is released under the MIT license. See LICENSE for details.

Latest podspec

    "name": "Aquaman",
    "version": "0.0.4",
    "summary": "An easy solution to nested scrolling",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "bawn": "[email protected]"
    "swift_versions": "4.2",
    "source": {
        "git": "",
        "tag": "0.0.4"
    "platforms": {
        "ios": "9.0"
    "requires_arc": true,
    "public_header_files": [
    "source_files": [
    "swift_version": "4.2"

Pin It on Pinterest

Share This