{"id":20226033,"url":"https://github.com/augustrush/aranimation","last_synced_at":"2025-04-05T11:09:36.384Z","repository":{"id":56900965,"uuid":"46093338","full_name":"AugustRush/ARAnimation","owner":"AugustRush","description":"ARAnimation is an Core Animation library to make you animations easily.","archived":false,"fork":false,"pushed_at":"2017-04-17T03:44:36.000Z","size":249,"stargazers_count":562,"open_issues_count":1,"forks_count":78,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-29T10:07:43.026Z","etag":null,"topics":[],"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/AugustRush.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-11-13T01:59:53.000Z","updated_at":"2024-09-14T19:11:43.000Z","dependencies_parsed_at":"2022-08-21T02:50:48.197Z","dependency_job_id":null,"html_url":"https://github.com/AugustRush/ARAnimation","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/AugustRush%2FARAnimation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AugustRush%2FARAnimation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AugustRush%2FARAnimation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AugustRush%2FARAnimation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AugustRush","download_url":"https://codeload.github.com/AugustRush/ARAnimation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325693,"owners_count":20920714,"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-14T07:15:52.851Z","updated_at":"2025-04-05T11:09:36.368Z","avatar_url":"https://github.com/AugustRush.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![](https://github.com/AugustRush/ARAnimation/blob/develop/title.png)\n\n*___ARAnimation is an Core Animation library to make you animations easily.___*\n\n\n## Features\n\n* __Layer animations__\n* __Layer Spring Animations__\n* __Custom TimingFunction(easing funtion)__\n* __Official style block Animations__\n\n## Install\n\n#### Cocoapods \n* **pod 'ARAnimation',:git =\u003e \"https://github.com/AugustRush/ARAnimation.git\"**\n\n#### Manually\n* **just drag demo source ducument to your project**\n\n# Usage\n\n## Example1\n\n![](https://github.com/AugustRush/ARAnimation/blob/master/ex1.gif)\n--------------------------------------\n```\n[UIView AR_animationWithDuration:2.0\n                          animations:^{\n                              self.redView.layer.rotation = M_PI*10;\n                              self.redView.layer.cornerRadius = 50;\n                          }];\n```\n\n## Example2 (Multistep animations block Nested)\n\n![](https://github.com/AugustRush/ARAnimation/blob/master/rotaion.gif)\n\n---------------------------------------\n\n```\n void(^animation4)(void) = ^{\n        [self.view setNeedsLayout];\n        [UIView AR_animationWithDuration:0.5 delay:0.0 easing:kAREasingCurveBounceOut animations:^{\n            [self.view layoutIfNeeded];\n        } completion:^{\n            NSLog(@\"all animations completion\");\n        }];\n    };\n    \n    void(^animation3)(void) = ^{\n        [UIView AR_springAnimationWithDuration:1 animations:^{\n            self.redView.layer.scale = 2;\n            self.yellowView.layer.scale = 1;\n            self.redView.layer.position = CGPointMake(CGRectGetMidX(self.view.bounds), 250);\n            self.yellowView.layer.position = CGPointMake(CGRectGetMidX(self.view.bounds), 250);\n        } completion:animation4];\n    };\n    \n    void(^animation2)(void) = ^{\n        [UIView AR_springAnimationWithDuration:1.5 animations:^{\n            self.redView.layer.cornerRadius = CGRectGetMidX(self.redView.bounds);\n            self.yellowView.layer.cornerRadius = CGRectGetMidX(self.yellowView.bounds);\n        } completion:animation3];\n    };\n    \n    void(^animation1)(void) = ^{\n        [UIView AR_animationWithDuration:0.5 animations:^{\n            self.redView.layer.position = CGPointMake(CGRectGetMidX(self.view.bounds), 150);\n            self.yellowView.layer.position = CGPointMake(CGRectGetMidX(self.view.bounds), 150);\n            self.redView.layer.scaleX = 1.3;\n            self.yellowView.layer.scaleY = 1.3;\n        } completion:animation2];\n    };\n    \n    \n    [UIView AR_animationWithDuration:2 animations:^{\n        self.redView.backgroundColor = [self randomColor];\n        self.yellowView.backgroundColor = [self randomColor];\n        self.yellowView.alpha = 1;\n        \n        self.redView.layer.rotation = M_PI*4;\n        self.yellowView.layer.rotation = -M_PI*4;\n    } completion:animation1];\n```\n\n## Official block style\n\n####Basic\n```\n+ (void)AR_animationWithDuration:(NSTimeInterval)duration\n                      animations:(void (^)(void))animations;\n\n+ (void)AR_animationWithDuration:(NSTimeInterval)duration\n                      animations:(void (^)(void))animations\n                      completion:(void (^)(void))completion;\n\n+ (void)AR_animationWithDuration:(NSTimeInterval)duration\n                      animations:(void (^)(void))animations\n                      completion:(void (^)(void))completion;\n\n+ (void)AR_animationWithDuration:(NSTimeInterval)duration\n                           delay:(CFTimeInterval)delay\n                      animations:(void (^)(void))animations\n                      completion:(void (^)(void))completion;\n\n+ (void)AR_animationWithDuration:(NSTimeInterval)duration\n                           delay:(CFTimeInterval)delay\n                          easing:(AREasingCurve)easing\n                      animations:(void (^)(void))animations\n                      completion:(void (^)(void))completion;\n\n+ (void)AR_animationWithDuration:(NSTimeInterval)duration\n                           delay:(CFTimeInterval)delay\n                     repeatCount:(NSUInteger)repeatCount\n                    autoreverses:(BOOL)autoreverses\n                          easing:(AREasingCurve)easing\n                      animations:(void (^)(void))animations\n                      completion:(void (^)(void))completion;\n```\n----------------------------------------\n\n#### Spring\n```\n+ (void)AR_springAnimationWithDuration:(NSTimeInterval)duration\n                            animations:(void (^)(void))animations;\n\n+ (void)AR_springAnimationWithDuration:(NSTimeInterval)duration\n                            animations:(void (^)(void))animations\n                            completion:(void (^)(void))completion;\n\n+ (void)AR_springAnimationWithDuration:(NSTimeInterval)duration\n                                 delay:(CFTimeInterval)delay\n                            animations:(void (^)(void))animations\n                            completion:(void (^)(void))completion;\n\n+ (void)AR_springAnimationWithDuration:(NSTimeInterval)duration\n                                 delay:(CFTimeInterval)delay\n                                  mass:(CGFloat)mass\n                               damping:(CGFloat)damping\n                             stiffness:(CGFloat)stiffness\n                       initialVelocity:(CGFloat)initialVelocity\n                            animations:(void (^)(void))animations\n                            completion:(void (^)(void))completion;\n\n+ (void)AR_springAnimationWithDuration:(NSTimeInterval)duration\n                                 delay:(CFTimeInterval)delay\n                           repeatCount:(NSUInteger)repeatCount\n                          autoreverses:(BOOL)autoreverses\n                                  mass:(CGFloat)mass\n                               damping:(CGFloat)damping\n                             stiffness:(CGFloat)stiffness\n                       initialVelocity:(CGFloat)initialVelocity\n                            animations:(void (^)(void))animations\n                            completion:(void (^)(void))completion;\n```\n\n## Support Layer animatable propertys\n\n* **kARLayerPosition**\n* **kARLayerPositionX**\n* **kARLayerPositionY**\n* **kARLayerCornerRadius**\n* **kARLayerZPositoin**\n* **kARLayerBorderWidth**\n* **kARLayerScaleX**\n* **kARLayerScaleY**\n* **kARLayerScale**\n* **kARLayerBounds**\n* **kARLayerBackgroundColor**\n* **kARLayerOpacity**\n* **kARLayerRotationX**\n* **kARLayerRotationY**\n* **kARLayerRotation**\n* **kARLayerAnchorPoint**\n* **kARShapeLayerStrokeEnd**\n* **kARShapeLayerStrokeStart**\n\n## Reference\n\n* www.gizma.com/easing/#quad2\n* https://es.wikipedia.org/wiki/Oscilador_armónico\n* http://objccn.io/issue-12-4/\n* https://github.com/robb/RBBAnimation\n\n## Next\n\n* **More animatable layer's propertys**\n* **Custom animaton ??**\n* **Chainable animations ??**\n\n## Supplement\n\n* **Please email me if you have any idea ‘liupingwei30@gmail.com’**\n\n## Licence\n\nThe MIT License (MIT)\n\nCopyright (c) 2015 August\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugustrush%2Faranimation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faugustrush%2Faranimation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugustrush%2Faranimation/lists"}