{"id":18270187,"url":"https://github.com/coolbeet/CBStoreHouseTransition","last_synced_at":"2025-04-04T23:31:49.856Z","repository":{"id":21488660,"uuid":"24807511","full_name":"coolbeet/CBStoreHouseTransition","owner":"coolbeet","description":"A custom transition inspired by Storehouse iOS app, also support pop gesture.","archived":false,"fork":false,"pushed_at":"2014-10-05T05:41:32.000Z","size":4032,"stargazers_count":456,"open_issues_count":2,"forks_count":40,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-11-05T11:52:28.046Z","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":"stevebrownlee/djangazon","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coolbeet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-05T03:20:23.000Z","updated_at":"2024-04-03T02:02:33.000Z","dependencies_parsed_at":"2022-08-21T15:01:18.028Z","dependency_job_id":null,"html_url":"https://github.com/coolbeet/CBStoreHouseTransition","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolbeet%2FCBStoreHouseTransition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolbeet%2FCBStoreHouseTransition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolbeet%2FCBStoreHouseTransition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolbeet%2FCBStoreHouseTransition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coolbeet","download_url":"https://codeload.github.com/coolbeet/CBStoreHouseTransition/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266476,"owners_count":20910831,"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-11-05T11:38:23.361Z","updated_at":"2025-04-04T23:31:46.305Z","avatar_url":"https://github.com/coolbeet.png","language":"Objective-C","readme":"CBStoreHouseTransition\n========\n\nWhat is it?\n---\n\nA custom transition inspired by [Storehouse](https://www.storehouse.co/) iOS app, also support pop gesture.\n\n![screenshot] (https://s3.amazonaws.com/suyu.test/CBStoreHouseTransition.gif)\n\nVideo\n---\n[![CBStoreHouseTransition](http://img.youtube.com/vi/hSmsJNzopJ0/0.jpg)](http://www.youtube.com/watch?v=hSmsJNzopJ0)\n\nFeatures\n---\n\n* One class file includes both pop and push transition and pop gesture.\n* Fully customizable transition animation.\n* Works for following iOS custom transition types:\n  * `UINavigationController`push and pop\n  * `UIViewController`presentations and dismissals\n\nWhich files are needed?\n---\nYou only need to include `CBStoreHouseTransition (.h .m)` in your project, it contains both animator and interactive class.\n\nCocoaPods support is coming very soon!\n\nHow to use it\n---\n\nFor animator object you need to set proper `AnimationType` to match `UINavigationControllerOperation` object.\n\nFor interactive transition you need to attach current view controller using:\n``` objective-c\n- (void)attachToViewController:(UIViewController *)viewController;\n```\nA edge pan gesture will be added on the view controller's root view to handle the pop gesture and drive the interactive transition.\n\nThen just return the proper animatior or interactive object in related delegate method, following is a  example using `CBStoreHouseTransition` for `UINavigationController`. \n\nFor more information about iOS custom transition, please refer to [WWDC 2013](https://developer.apple.com/videos/wwdc/2013/) `Custom Transitions Using View Controllers` video.\n\n``` objective-c\n- (void)viewDidLoad\n{\n    ...\n    self.animator = [[CBStoreHouseTransitionAnimator alloc] init];\n    ...\n}\n\n- (void)viewDidAppear:(BOOL)animated\n{\n    ...\n    self.navigationController.delegate = self;\n    self.interactiveTransition = [[CBStoreHouseTransitionInteractiveTransition alloc] init];\n    [self.interactiveTransition attachToViewController:self];\n    ...\n}\n\n-(id\u003cUIViewControllerAnimatedTransitioning\u003e)navigationController:(UINavigationController *)navigationController\n                                 animationControllerForOperation:(UINavigationControllerOperation)operation\n                                              fromViewController:(UIViewController *)fromVC\n                                                toViewController:(UIViewController *)toVC\n{\n    switch (operation) {\n        case UINavigationControllerOperationPush:\n            //we don't need interactive transition for push\n            self.interactiveTransition = nil;\n            self.animator.type = AnimationTypePush;\n            return self.animator;\n        case UINavigationControllerOperationPop:\n            self.animator.type = AnimationTypePop;\n            return self.animator;\n        default:\n            return nil;\n    }\n}\n\n- (id\u003cUIViewControllerInteractiveTransitioning\u003e)navigationController:(UINavigationController *)navigationController\n                         interactionControllerForAnimationController:(id\u003cUIViewControllerAnimatedTransitioning\u003e)animationController\n{\n    return self.interactiveTransition;\n}\n\n```\n\nSince we don't need interactive for push transition or when user specificity taps back button, you need to set `self.interactive` to `nil`.\n\nYou can customize following properties to change the animation behavior:\n``` objective-c\n@property (nonatomic) CGFloat duration;\n@property (nonatomic) CGFloat rotateAngle;\n@property (nonatomic) CGFloat relativeDelayLeftView;\n@property (nonatomic) CGFloat relativeDelayRightView;\n@property (nonatomic) CGFloat percentageAdjustFactor;\n```\n\n\n","funding_links":[],"categories":["etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolbeet%2FCBStoreHouseTransition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoolbeet%2FCBStoreHouseTransition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolbeet%2FCBStoreHouseTransition/lists"}