{"id":32109936,"url":"https://github.com/hirohisa/pagecontroller","last_synced_at":"2025-10-20T13:46:39.743Z","repository":{"id":34625048,"uuid":"38574546","full_name":"hirohisa/PageController","owner":"hirohisa","description":"Infinite paging controller, scrolling through contents and title bar scrolls with a delay","archived":false,"fork":false,"pushed_at":"2022-06-13T15:14:34.000Z","size":927,"stargazers_count":408,"open_issues_count":0,"forks_count":43,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-10-20T13:46:30.099Z","etag":null,"topics":["carthage","cocoapods","delay","pagecontroller","scrolling","scrollview-component"],"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/hirohisa.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":"2015-07-05T15:51:03.000Z","updated_at":"2025-04-14T15:53:46.000Z","dependencies_parsed_at":"2022-09-14T17:30:36.722Z","dependency_job_id":null,"html_url":"https://github.com/hirohisa/PageController","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/hirohisa/PageController","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirohisa%2FPageController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirohisa%2FPageController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirohisa%2FPageController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirohisa%2FPageController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hirohisa","download_url":"https://codeload.github.com/hirohisa/PageController/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirohisa%2FPageController/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280102712,"owners_count":26272390,"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-10-20T02:00:06.978Z","response_time":62,"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":["carthage","cocoapods","delay","pagecontroller","scrolling","scrollview-component"],"created_at":"2025-10-20T13:46:36.410Z","updated_at":"2025-10-20T13:46:39.737Z","avatar_url":"https://github.com/hirohisa.png","language":"Swift","readme":"PageController\n==================\n[![Build-Status](https://api.travis-ci.org/hirohisa/PageController.svg?branch=master)](https://travis-ci.org/hirohisa/PageController)\n[![CocoaPods](https://img.shields.io/cocoapods/v/PageController.svg)](https://cocoapods.org/pods/PageController)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![license](https://img.shields.io/badge/license-MIT-000000.svg)](https://github.com/hirohisa/ImageLoaderSwift/blob/master/LICENSE)\n\nPageController is infinite paging controller, scrolling through contents and title bar scrolls with a delay. Then it provide user interaction to smoothly and effortlessly moving. It is for iOS written in Swift.\n\n![sample](Example%20project/example.gif)\n\nRequirements\n----------\n\nPageController | Xcode | Swift\n-------------- | ----- | -----\n0.7.x +        | 9.4   | 4.1\n0.6.x          | 9.2   | 4.0\n0.5.x          | 8.2   | 3.0\n0.4.x          | 8.0   | 2.2\n0.3.x          | 7.0+  | 2.0\n0.2.0          | 6.4   | 1.2\n\n\nFeatures\n----------\n\n- [x] To inherit from [DCScrollView](https://github.com/hirohisa/DCScrollView)\n- [x] Use `UIViewController`, not `UIView` like `UITabBarController`\n- [x] Support AutoLayout about MenuCell\n- [x] Handling to change current view controller with Delegate.\n- [x] Scrolling smoothly and effortlessly\n- [x] Keep to smoothly in scrolling contents\n\nInstallation\n----------\n\n### CocoaPods\n\n```ruby\npod 'PageController'\n```\n\n### Carthage\n\nTo integrate PageController into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```\ngithub \"hirohisa/PageController\" ~\u003e 0.7.1\n```\n\nUsage\n----------\n\n**viewControllers**\n\nType is [UIViewController], and element must have title.\n\n```swift\n\nimport PageController\n\nclass CustomViewController: PageController {\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n        viewControllers = createViewControllers()\n    }\n\n    func createViewControllers() -\u003e [UIViewController] {\n        let names = [\n            \"favorites\",\n            \"recents\",\n            \"contacts\",\n            \"history\",\n            \"more\",\n        ]\n\n        return names.map { name -\u003e UIViewController in\n            let viewController = ContentViewController()\n            viewController.title = name\n            return viewController\n        }\n    }\n}\n\n```\n\n**MenuBar**\n\nEnable to change backgroundColor, frame.\nIf you change MenuBarCell.height, then override `frameForMenuBar` and set height.\n```swift\n/// backgroudColor\nmenuBar.backgroundColor = UIColor.whiteColor().colorWithAlphaComponent(0.9)\n/// skip to auto-select after scrolling\nmenuBar.isAutoSelectDidEndUserInteractionEnabled = false\n\n/// frame, override this function\noverride var frameForMenuBar: CGRect {\n    let frame = super.frameForMenuBar\n\n    return CGRect(x: frame.minX, y: frame.minY, width: frame.width, height: 60)\n}\n```\n\n**MenuBarCell**\n\nEnable to use Custom Cell supported `MenuBarCellable` protocol:\n```swift\npublic protocol MenuBarCellable {\n    var index: Int { get set }\n    func setTitle(_ title: String)\n    func setHighlighted(_ highlighted: Bool)\n    func prepareForReuse()\n}\n\npublic func register(_ cellClass: MenuBarCellable) {\n    guard let cellClass = cellClass as? UIView.Type else { fatalError() }\n    self.cellClass = cellClass\n}\n\npublic func register(_ nib: UINib) {\n    self.nib = nib\n}\n```\n\n**MenuBarCellable**\n\n```swift\npublic protocol MenuBarCellable {\n\n    // it's used by PageController\n    var index: Int { get set }\n\n    // it is used to set to Label.text, caused by deprecating MenuCell over 0.7\n    func setTitle(_ title: String)\n\n    // it's instead of `updateData` over 0.7,\n    func setHighlighted(_ highlighted: Bool)\n\n    // Called by the menu bar on creating the instance.\n    func prepareForUse()\n\n}\n```\n\n## License\n\nPageController is available under the MIT license.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirohisa%2Fpagecontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhirohisa%2Fpagecontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirohisa%2Fpagecontroller/lists"}