{"id":2154,"url":"https://github.com/wongzigii/WZDraggableSwitchHeaderView","last_synced_at":"2025-08-02T23:32:02.572Z","repository":{"id":33079077,"uuid":"36716204","full_name":"wongzigii/WZDraggableSwitchHeaderView","owner":"wongzigii","description":":octocat: Show status for transition across viewControllers.","archived":false,"fork":false,"pushed_at":"2016-11-05T09:55:01.000Z","size":2000,"stargazers_count":559,"open_issues_count":2,"forks_count":41,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-04-30T04:46:55.893Z","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/wongzigii.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-06-02T07:33:43.000Z","updated_at":"2024-04-03T01:57:56.000Z","dependencies_parsed_at":"2022-08-21T05:50:46.705Z","dependency_job_id":null,"html_url":"https://github.com/wongzigii/WZDraggableSwitchHeaderView","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wongzigii%2FWZDraggableSwitchHeaderView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wongzigii%2FWZDraggableSwitchHeaderView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wongzigii%2FWZDraggableSwitchHeaderView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wongzigii%2FWZDraggableSwitchHeaderView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wongzigii","download_url":"https://codeload.github.com/wongzigii/WZDraggableSwitchHeaderView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228503133,"owners_count":17930517,"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-01-05T20:16:06.069Z","updated_at":"2025-08-02T23:32:02.553Z","avatar_url":"https://github.com/wongzigii.png","language":"Objective-C","funding_links":[],"categories":["UI","Objective-C"],"sub_categories":["Font","Other free courses","Other Testing"],"readme":"# WZDraggableSwitchHeaderView\n\n[![Build Status](http://img.shields.io/travis/wongzigii/WZDraggableSwitchHeaderView.svg?style=flat)](https://travis-ci.org/wongzigii/WZDraggableSwitchHeaderView) \n[![Version](https://img.shields.io/cocoapods/v/WZDraggableSwitchHeaderView.svg?style=flat)](http://cocoadocs.org/docsets/WZDraggableSwitchHeaderView)\n[![Powered by DartNode](https://dartnode.com/branding/DN-Open-Source-sm.png)](https://dartnode.com \"Powered by DartNode - Free VPS for Open Source\")\n\n#### How far your thumb can reach on the iPhone 6 Plus ?\n#### Or, being bored with tapping the button or navigation Item to switch between viewControllers ?\n\n## Quick Look\n\n![](./GIF/WZAnimatingTransition.gif)\n\n## About\nThis project is inspired by Nike's awesome official App [Making of Making Powered by NIKE MSI](https://itunes.apple.com/us/app/making-making-powered-by-nike/id662227880?mt=8).\n\n## Installation\n### [CocoaPods](http://cocoapods.org/)\n\n````ruby\n# For latest release in CocoaPods\npod 'WZDraggableSwitchHeaderView'\n````\n\nOr\n\n````ruby\n# Feeling adventurous? Get the latest on develop\npod 'WZDraggableSwitchHeaderView', :git =\u003e 'https://github.com/wongzigii/WZDraggableSwitchHeaderView.git', :branch =\u003e 'master'\n````\n\n## Getting Start\n\n````objc\n#import \"WZDraggableSwitchHeaderView.h\"\n````\n\nCreate an instance of `WZDraggableSwitchHeaderView`:\n\n````objc\t\nself.headerView = [[WZDraggableSwitchHeaderView alloc] initWithDelegate:self\n                                                                  frame:CGRectMake(0,0,self.view.bounds.size.width,50)\n                                                      normalStateHeight:20.0f\n                                                 heightCanTriggerSwitch:70.0f];\n[self.view addSubView:self.headerView];           \n````\n\nImplement the delegate method that will be invoked:\n\n````objc\n#pragma mark - WZDraggableSwitchHeaderViewDelegate\n\n- (void)WZDraggableSwitchHeaderViewDidTriggerDeepDragging;\n{\n    [self.navigationController.view.layer addAnimation:[WZAnimatingTransition backwardTransition] forKey:@\"transition\"];\n    [self.navigationController popToRootViewControllerAnimated:NO];\n}\n````\n\nHook on the `UIScrollViewDelegate`:\n\n````objc\n#pragma mark - UIScrollViewDelegate\n\n- (void)scrollViewDidScroll:(UIScrollView *)scrollView\n{\n    [self.headerView WZDraggableSwitchHeaderViewDidScroll:scrollView];\n}\n\n- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate\n{\n    [self.headerView WZDraggableSwitchHeaderViewDidEndDragging:scrollView];\n}\n````\n\nDone!       \n        \n## Customization\n\n````objc\n/// The y contentOffset range between normal state and shallow dragging state. If end dragging on this range, `- WZDraggableSwitchHeaderViewDidTriggerShallowDragging` will be invoked.\n/// Default is 20.0f.\n@property (nonatomic, assign) CGFloat normalStateHeight;\n\n/// The total height of this header view will trace down with. End up dragging on the y contentOffset if less than `heightCanTriggerSwitch`, `- WZDraggableSwitchHeaderViewDidTriggerDeepDragging` will be invoked properly.\n/// Default is 70.0f.\n@property (nonatomic, assign) CGFloat heightCanTriggerSwitch;\n\n/// The status label shows the text of state.\n@property (nonatomic, strong) UILabel *statusLabel;\n\n/// The button can be tapped to return to menu.\n@property (nonatomic, strong) UIButton *backButton;\n\n/// The layer of arrow Image.\n@property (nonatomic, strong) CALayer *arrowImage;\n\n/// The state of this headerView.\n@property (nonatomic, assign) WZDraggableSwitchState state;\n\n/// The text will show in normal state. Default is `ABOUT`.\n@property (nonatomic, strong) NSString *normalStateText;\n\n/// The text will show on shallow dragging state. Default is `PULL TO RETURN TO MENU.`\n@property (nonatomic, strong) NSString *shallowStateText;\n\n/// The text will show on deep dragging state. Default is `RELEASE TO RETURN TO MENU.`\n@property (nonatomic, strong) NSString *deepStateText; \n````\n\n## Contact\n\u003ca href=\"https://twitter.com/wongzigii\"\u003e\n  \u003cimg alt=\"Follow me on Twitter\"\n       src=\"./GIF/twitter64.png\" /\u003e\n\u003c/a\u003e\n\n## Credits\n\nLogo : \n\n- [Iconic](https://github.com/somerandomdude/Iconic)\n\n- [Logo/Emblem/Mark for Hypercompact](https://dribbble.com/shots/197202-Logo-Emblem-Mark-for-Hypercompact?list=searches\u0026offset=4)\n\nFont : \n\n- Fundamental Brigade Schwer Copyright (c) 2012  by Peter Wiegel.\n\n## License\nWZDraggableSwitchHeaderView is available under the MIT license, see the [LICENCE](./LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwongzigii%2FWZDraggableSwitchHeaderView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwongzigii%2FWZDraggableSwitchHeaderView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwongzigii%2FWZDraggableSwitchHeaderView/lists"}