{"id":13763826,"url":"https://github.com/ltebean/LTNavigationbar","last_synced_at":"2025-05-10T17:31:05.241Z","repository":{"id":27349886,"uuid":"30825037","full_name":"ltebean/LTNavigationBar","owner":"ltebean","description":"UINavigationBar Category which allows you to change its appearance dynamically","archived":false,"fork":false,"pushed_at":"2018-09-26T10:37:42.000Z","size":4753,"stargazers_count":4462,"open_issues_count":38,"forks_count":678,"subscribers_count":111,"default_branch":"master","last_synced_at":"2025-04-12T02:58:41.629Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/ltebean.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-02-15T11:01:25.000Z","updated_at":"2025-03-19T03:28:42.000Z","dependencies_parsed_at":"2022-08-31T17:22:50.900Z","dependency_job_id":null,"html_url":"https://github.com/ltebean/LTNavigationBar","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltebean%2FLTNavigationBar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltebean%2FLTNavigationBar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltebean%2FLTNavigationBar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltebean%2FLTNavigationBar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ltebean","download_url":"https://codeload.github.com/ltebean/LTNavigationBar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253453212,"owners_count":21911061,"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":[],"created_at":"2024-08-03T15:01:00.295Z","updated_at":"2025-05-10T17:31:00.230Z","avatar_url":"https://github.com/ltebean.png","language":"Objective-C","readme":"![LTNavigationbar](https://cocoapod-badges.herokuapp.com/v/LTNavigationBar/badge.png)\n\n\n## Deprecated\nThis lib uses a hacky way to achieve the result, in the new iOS version, the structure of UINavigation is changed and this lib no longer works anymore, so please check these alternatives:\n\n- https://github.com/andreamazz/AMScrollingNavbar\n- https://github.com/DanisFabric/RainbowNavigation\n- https://github.com/MoZhouqi/KMNavigationBarTransition\n\n\n## swift version\n\n[https://github.com/ltebean/LTNavigationBar/tree/swift3.0](https://github.com/ltebean/LTNavigationBar/tree/swift3.0)\n\n## Purpose\nIt is hard to change the appearance of UINavigationBar dynamically, so I made this lib to make the job easy.\n\n\n## Demo\n#### 1. Changing the background color:\n![LTNavigationbar](https://raw.githubusercontent.com/ltebean/LTNavigationBar/master/images/demo.gif)\n\n\n#### 2. Making navigation bar scroll along with a scroll view:\n![LTNavigationbar](https://raw.githubusercontent.com/ltebean/LTNavigationBar/master/images/demo2.gif)\n\n## Usage\n\nFirst, import this lib:\n```objective-c\n#import \"UINavigationBar+Awesome.h\"\n```\n\nThe category includes lots of method that helps to change UINavigationBar's appearance dynamically:\n```objective-c\n@interface UINavigationBar (Awesome)\n- (void)lt_setBackgroundColor:(UIColor *)backgroundColor;\n- (void)lt_setElementsAlpha:(CGFloat)alpha;\n- (void)lt_setTranslationY:(CGFloat)translationY;\n- (void)lt_reset;\n@end\n```\n\nYou can call the various setter wherever you want, like:\n```objective-c\n[self.navigationController.navigationBar lt_setBackgroundColor:[UIColor blueColor]];\n```\n\nAnd usually in `viewWillDisappear`, you should call this method to avoid any side effects:\n```objective-c\n- (void)viewWillDisappear:(BOOL)animated\n{\n    [super viewWillDisappear:animated];\n    [self.navigationController.navigationBar lt_reset];\n}\n```\n\nSee the example for details~ \n","funding_links":[],"categories":["UI组件"],"sub_categories":["Navigation Bar/导航控件"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltebean%2FLTNavigationbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fltebean%2FLTNavigationbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltebean%2FLTNavigationbar/lists"}