{"id":13396490,"url":"https://github.com/marty-suzuki/SAHistoryNavigationViewController","last_synced_at":"2025-03-13T23:31:23.008Z","repository":{"id":29375020,"uuid":"32909821","full_name":"marty-suzuki/SAHistoryNavigationViewController","owner":"marty-suzuki","description":"SAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationContoller. Support 3D Touch!","archived":false,"fork":false,"pushed_at":"2017-10-31T16:46:23.000Z","size":16528,"stargazers_count":1569,"open_issues_count":2,"forks_count":90,"subscribers_count":35,"default_branch":"master","last_synced_at":"2024-08-10T02:01:53.594Z","etag":null,"topics":["animation","support-3d-touch","swift"],"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/marty-suzuki.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-03-26T05:45:13.000Z","updated_at":"2024-06-13T13:55:53.000Z","dependencies_parsed_at":"2022-09-05T21:00:36.538Z","dependency_job_id":null,"html_url":"https://github.com/marty-suzuki/SAHistoryNavigationViewController","commit_stats":null,"previous_names":["szk-atmosphere/sahistorynavigationviewcontroller"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marty-suzuki%2FSAHistoryNavigationViewController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marty-suzuki%2FSAHistoryNavigationViewController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marty-suzuki%2FSAHistoryNavigationViewController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marty-suzuki%2FSAHistoryNavigationViewController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marty-suzuki","download_url":"https://codeload.github.com/marty-suzuki/SAHistoryNavigationViewController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221421547,"owners_count":16817828,"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","support-3d-touch","swift"],"created_at":"2024-07-30T18:00:55.008Z","updated_at":"2024-10-25T11:30:43.245Z","avatar_url":"https://github.com/marty-suzuki.png","language":"Swift","funding_links":[],"categories":["UI","Libs","UI [🔝](#readme)","Swift","User Interface"],"sub_categories":["UI","Mobile","Other Testing"],"readme":"# SAHistoryNavigationViewController\n\n[![Platform](http://img.shields.io/badge/platform-ios-blue.svg?style=flat\n)](https://developer.apple.com/iphone/index.action)\n[![Language](http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat\n)](https://developer.apple.com/swift)\n[![Version](https://img.shields.io/cocoapods/v/SAHistoryNavigationViewController.svg?style=flat)](http://cocoapods.org/pods/SAHistoryNavigationViewController)\n[![License](https://img.shields.io/cocoapods/l/SAHistoryNavigationViewController.svg?style=flat)](http://cocoapods.org/pods/SAHistoryNavigationViewController)\n\n**Support 3D Touch for iOS9!!**\n\n![](./SampleImage/touch.gif)\n![](./SampleImage/3dtouch.gif)\n![](./SampleImage/sample.gif)\n\nSAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationContoller.\n\n[ManiacDev.com](https://maniacdev.com/) referred.  \n[https://maniacdev.com/2015/03/open-source-component-enhancing-the-back-button-with-view-history-navigation](https://maniacdev.com/2015/03/open-source-component-enhancing-the-back-button-with-view-history-navigation)\n\n## Features\n\n- [x] iOS task manager like UI\n- [x] Launch Navigation History with Long tap action of Back Bar Button\n- [x] Support Swift2.0\n- [x] Support 3D Touch (If device is not supported 3D Touch, automatically replacing to long tap gesture.)\n- [x] Support Swift2.3\n- [x] Sipport Swift3\n\n## Installation\n\n#### CocoaPods\n\nSAHistoryNavigationViewController is available through [CocoaPods](http://cocoapods.org). If you have cocoapods 0.38.0 or greater, you can install\nit, simply add the following line to your Podfile:\n\n    pod \"SAHistoryNavigationViewController\"\n\n#### Manually\n\nAdd the [SAHistoryNavigationViewController](./SAHistoryNavigationViewController) directory to your project.\n\n## Usage\n\nIf you install from cocoapods, You have to write `import SAHistoryNavigationViewController`.\n\n\n#### Storyboard or Xib\n![](./SampleImage/storyboard.png)\n\nSet custom class of UINavigationController to SAHistoryNavigationViewController.\nIn addition, set module to SAHistoryNavigationViewController.\n\n#### Code\n\nYou can use SAHistoryNavigationViewController as `self.sah.navigationController` in any ViewController, bacause implemented `extension SAHistoryExtension` as below codes.\n\n```swift\npublic protocol SAHistoryCompatible {\n    associatedtype CompatibleType\n    var sah: CompatibleType { get }\n}\n\npublic extension SAHistoryCompatible {\n    public var sah: SAHistoryExtension\u003cSelf\u003e {\n        return SAHistoryExtension(self)\n    }\n}\n\npublic final class SAHistoryExtension\u003cBase\u003e {\n    public let base: Base\n    public init(_ base: Base) {\n        self.base = base\n    }\n}\n\nextension UIViewController: SAHistoryCompatible {}\n\nextension SAHistoryExtension where Base: UIViewController {\n    public var navigationController: SAHistoryNavigationViewController? {\n        return base.navigationController as? SAHistoryNavigationViewController\n    }\n}\n```\n\nAnd you have to initialize like this.\n\n\n```swift\nlet ViewController = UIViewController()\nlet navigationController = SAHistoryNavigationViewController()\nnavigationController.setViewControllers([ViewController], animated: true)\npresentViewController(navigationController, animated: true, completion: nil)\n```\n\nIf you want to launch Navigation History without long tap action, use this code.\n\n```swift\n//In any UIViewController\nself.sah.navigationController?.showHistory()\n```\n\n## Customize\n\nIf you want to customize background of Navigation History, you can use those methods.\n\n```swift\n//In any UIViewController\nself.sah.navigationController?.contentView\nself.sah.navigationController?.historyBackgroundColor\n```\n\nThis is delegate methods.\n\n```swift\n@objc public protocol SAHistoryNavigationViewControllerDelegate: NSObjectProtocol {\n    optional func historyControllerDidShowHistory(controller: SAHistoryNavigationViewController, viewController: UIViewController)\n}\n```\n\n## Requirements\n\n- Xcode 8.0 or greater\n- iOS8.0 or greater\n- [MisterFusion](https://github.com/szk-atmosphere/MisterFusion)\n\n## Author\n\nTaiki Suzuki, s1180183@gmail.com\n\n## License\n\nSAHistoryNavigationViewController is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarty-suzuki%2FSAHistoryNavigationViewController","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarty-suzuki%2FSAHistoryNavigationViewController","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarty-suzuki%2FSAHistoryNavigationViewController/lists"}