{"id":855,"url":"https://github.com/AlexandrGraschenkov/MagicPie","last_synced_at":"2025-07-30T19:32:59.492Z","repository":{"id":11130672,"uuid":"13493244","full_name":"AlexandrGraschenkov/MagicPie","owner":"AlexandrGraschenkov","description":"Amazing animations available with MagicPie!","archived":false,"fork":false,"pushed_at":"2024-06-12T11:40:09.000Z","size":6130,"stargazers_count":529,"open_issues_count":1,"forks_count":77,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-11-14T14:47:46.755Z","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/AlexandrGraschenkov.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-10-11T08:04:44.000Z","updated_at":"2024-06-14T08:54:31.000Z","dependencies_parsed_at":"2024-06-18T21:24:15.010Z","dependency_job_id":null,"html_url":"https://github.com/AlexandrGraschenkov/MagicPie","commit_stats":{"total_commits":32,"total_committers":5,"mean_commits":6.4,"dds":0.4375,"last_synced_commit":"104c11b7451e3cb04e8ca4a5e5dc51c40e6cd52b"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexandrGraschenkov%2FMagicPie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexandrGraschenkov%2FMagicPie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexandrGraschenkov%2FMagicPie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexandrGraschenkov%2FMagicPie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexandrGraschenkov","download_url":"https://codeload.github.com/AlexandrGraschenkov/MagicPie/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228179002,"owners_count":17881120,"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:15:33.084Z","updated_at":"2024-12-04T19:32:17.502Z","avatar_url":"https://github.com/AlexandrGraschenkov.png","language":"Objective-C","funding_links":[],"categories":["Charts","UI"],"sub_categories":["Other free courses","Getting Started"],"readme":"MagicPie\n========\n\nPowerful pie layer for creating your own pie view. PieLayer provide great animation with simple usage.\n\nThe main advantage of that control that there is no worry about displaying of animation. Animation will display correctly even if you will add new elements during execution of another slice deleting animation. That's amazing! And here is no delegates. I like delegates, but in this case I think they are excess.\n\n\u003cimg src=\"https://github.com/Sk0rpion/MagicPie/blob/master/images/MagicPie.gif?raw=true\" alt=\"Demo\" width=\"359\" height=\"704\" /\u003e \u003cimg src=\"https://github.com/Sk0rpion/MagicPie/blob/master/images/MagicPie2.gif?raw=true\" alt=\"Demo\" width=\"359\" height=\"704\" /\u003e\n\nBe creative =)\n\n\u003cimg src=\"https://github.com/Sk0rpion/MagicPie/blob/master/images/MagicPie3.gif?raw=true\" alt=\"Demo\" width=\"359\" height=\"704\" /\u003e \u003cimg src=\"https://github.com/Sk0rpion/MagicPie/blob/master/images/MagicPie4.gif?raw=true\" alt=\"Demo\" width=\"371\" height=\"665\" /\u003e\n\n\n## Installation\n\nEdit your `PodFile` to include the following line:\n```\npod 'MagicPie'\n```\n\nThen import the main header.\n```\n#import \u003cMagicPie.h\u003e\n```\n\nHave a fun!\n\n### Swift Swift Swift Swift Swift\nOkay, now when you are reading this, I recommend to you look the example #2 in Swift.\n\n## Example Usage\n\nCreate pie:\n###### Obj-C\n```objective-c\nPieLayer* pieLayer = [[PieLayer alloc] init];\npieLayer.frame = CGRectMake(0, 0, 200, 200);\n[self.view.layer addSublayer:pieLayer];\n```\n###### Swift\n```swift\nlet pieLayer = PieLayer()\npieLayer.frame = CGRectMake(0, 0, 200, 200)\nview.layer.addSublayer(pieLayer)\n```\n\nAdd slices:\n###### Obj-C\n```objective-c\n[pieLayer addValues:@[[PieElement pieElementWithValue:5.0 color:[UIColor redColor]],\n                      [PieElement pieElementWithValue:4.0 color:[UIColor blueColor]],\n                      [PieElement pieElementWithValue:7.0 color:[UIColor greenColor]]] animated:YES];\n```\n###### Swift\n```swift\npieLayer.addValues([PieElement(value: 5.0, color: UIColor.redColor()),\n                    PieElement(value: 4.0, color: UIColor.blueColor()),\n                    PieElement(value: 7.0, color: UIColor.greenColor())], animated: true)\n```\n                          \nChange value with animation:\n###### Obj-C\n```objective-c\nPieElement* pieElem = pieLayer.values[0];\n[PieElement animateChanges:^{\n\tpieElem.val = 13.0;\n\tpieElem.color = [UIColor yellowColor];\n}];\n```\n###### Swift\n```swift\nlet pieElem = pieLayer.values[0]\nPieElement.animateChanges {\n\tpieElem.val = 13.0\n\tpieElem.color = UIColor.yellowColor()\n}\n```\n\nDelete slices:\n###### Obj-C\n```objective-c\n[pieLayer deleteValues:@[pieLayer.values[0], pieLayer.values[1]] animated:YES];\n```\n###### Swift\n```swift\npieLayer.deleteValues([pieLayer.values[0], pieLayer.values[1]], animated: true)\n```\n\n## Contact\n\nAlexandr Graschenkov: alexandr.graschenkov91@gmail.com\n\n## License\n\nMagicPie is available under the MIT license.\n\nCopyright © 2013 Alexandr Graschenkov.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexandrGraschenkov%2FMagicPie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlexandrGraschenkov%2FMagicPie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexandrGraschenkov%2FMagicPie/lists"}