{"id":21373923,"url":"https://github.com/QuintGao/GKNavigationController","last_synced_at":"2025-07-13T08:31:35.410Z","repository":{"id":56912111,"uuid":"94888941","full_name":"QuintGao/GKNavigationController","owner":"QuintGao","description":"iOS自定义导航栏-导航条联动（仿网易新闻、网易云音乐等导航栏滑动效果）","archived":false,"fork":false,"pushed_at":"2022-03-21T09:45:42.000Z","size":2582,"stargazers_count":61,"open_issues_count":3,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-07T12:04:43.683Z","etag":null,"topics":["navigationcontroller","pop"],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","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/QuintGao.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":"2017-06-20T12:30:53.000Z","updated_at":"2025-02-25T03:21:18.000Z","dependencies_parsed_at":"2022-08-21T03:20:17.022Z","dependency_job_id":null,"html_url":"https://github.com/QuintGao/GKNavigationController","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/QuintGao/GKNavigationController","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuintGao%2FGKNavigationController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuintGao%2FGKNavigationController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuintGao%2FGKNavigationController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuintGao%2FGKNavigationController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QuintGao","download_url":"https://codeload.github.com/QuintGao/GKNavigationController/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuintGao%2FGKNavigationController/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265109727,"owners_count":23712743,"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":["navigationcontroller","pop"],"created_at":"2024-11-22T08:29:35.734Z","updated_at":"2025-07-13T08:31:34.891Z","avatar_url":"https://github.com/QuintGao.png","language":"Objective-C","funding_links":[],"categories":["OOM-Leaks-Crash"],"sub_categories":["Navigation"],"readme":"## GKNavigationController --- iOS自定义导航栏-导航条联动\n部分内容参考 [RTRootNavigationController](https://github.com/rickytan/RTRootNavigationController) 和 [FDFullscreenPopGesture](https://github.com/forkingdog/FDFullscreenPopGesture)\n\n## 说明：\n\n现在大多数的APP都有导航栏联动效果，即滑动返回的时候导航栏也跟着一起返回，比如：网易新闻，网易云音乐，腾讯视频等等，于是通过查找一些资料及其他库的做法，自己也写了一个框架，可以让每一个控制器都拥有自己的导航栏，可以很方便的改变导航栏的样式等\n\n## 介绍：(本框架的特性)\n\n   * 支持自定义导航栏样式（隐藏、透明等）\n   * 支持控制器开关返回手势\n   * 支持控制器开关全屏返回手势\n   * 支持控制器设置距离左边屏幕左边的滑动区域\n   * 支持动态设置导航栏透明度，可实现渐变效果\n   * 完美解决UITableView，UIScrollView滑动手势冲突\n   * 支持Push一个UITabBarController（有缺陷）\n    \n## Demo中部分截图如下：\n\n![image](https://github.com/QuintGao/GKNavigationController/blob/master/GKNavigationControllerDemo/001.png)\n\n![image](https://github.com/QuintGao/GKNavigationController/blob/master/GKNavigationControllerDemo/002.png)\n\n![image](https://github.com/QuintGao/GKNavigationController/blob/master/GKNavigationControllerDemo/003.png)\n\n![image](https://github.com/QuintGao/GKNavigationController/blob/master/GKNavigationControllerDemo/004.png)\n\n![image](https://github.com/QuintGao/GKNavigationController/blob/master/GKNavigationControllerDemo/005.png)\n\n![image](https://github.com/QuintGao/GKNavigationController/blob/master/GKNavigationControllerDemo/006.png)\n\n## 用法简介\n\n1.  初始化，仍然使用系统方法\n\n```\n层次结构\n1. 根控制器的导航控制器  GKNavigationController\n                        - GKWrapViewController\n                            - GKWrapNavigationController\n                                - 你的VC1\n                      ... push\n                        - GKWrapViewController\n                            - GKWrapNavigationController\n                                - 你的VC2\n\n2. UITabBarController作为根控制器\n        UITabBarController\n  、、、、、、、、、、、、          tab1\n                GKNavigationController\n                    - GKWrapViewController\n                        - GKWrapNavigationController\n                            - 你的VC1\n            tab2\n                GKNavigationController\n                    - GKWrapViewController\n                        - GKWrapNavigationController\n                            - 你的VC2\n            ...\n\n```\n\n2. 部分属性介绍\n```\n\nUIViewController:\n\n/** 是否禁止当前控制器的滑动返回(包括全屏返回和边缘返回) */\n@property (nonatomic, assign) BOOL gk_interactivePopDisabled;\n\n/** 是否禁止当前控制器的全屏滑动返回 */\n@property (nonatomic, assign) BOOL gk_fullScreenPopDisabled;\n\n/** 全屏滑动时，滑动区域距离屏幕左边的最大位置，默认是0，表示全屏都可滑动 */\n@property (nonatomic, assign) CGFloat gk_popMaxAllowedDistanceToLeftEdge;\n\n/** 设置导航栏的透明度 */\n@property (nonatomic, assign) CGFloat gk_navBarAlpha;\n\n```\n\n3. 关于返回Item\n\n如果你不想用我写的返回item，你可以在当前控制器或者基类控制器中重写下面的方法：\n```\n- (UIBarButtonItem *)gk_customBackItemWithTarget:(id)target action:(SEL)action;\n\n```\n如果你push到的是一个UITabBarController，你需要在每个分栏的root控制器中重新定义返回按钮\n```\nself.navigationItem.leftBarButtonItem = ...\n```\n\n## Cocoapods(已支持)\n\npod 'GKNavigationController'\n\n## 缺陷及不足\n* 没有支持自定义转场，实现如：今日头条、腾讯新闻等的转场效果\n* push到一个UITabBarController时需要子控制器重新自定义返回按钮\n* 其他（待发现）\n\n## 时间记录\n* 2017.6.22 首次提交，发布\n* 2017.6.23 部分内容修改，完善\n* 2017.6.26 修复单个控制器不能设置手势返回、全屏返回、滑动区域的bug\n* 2017.7.6  支持cocoapods\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQuintGao%2FGKNavigationController","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FQuintGao%2FGKNavigationController","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQuintGao%2FGKNavigationController/lists"}