{"id":16426535,"url":"https://github.com/mownier/monactivityindicatorview","last_synced_at":"2025-04-05T23:12:08.671Z","repository":{"id":16343783,"uuid":"19093564","full_name":"mownier/MONActivityIndicatorView","owner":"mownier","description":"MONActivityIndicatorView is an awesome custom activity indicator view for iOS.","archived":false,"fork":false,"pushed_at":"2018-07-27T12:23:04.000Z","size":591,"stargazers_count":329,"open_issues_count":5,"forks_count":55,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-04-20T14:23:08.478Z","etag":null,"topics":["objective-c","uiactivityindicatorview"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"zhanganyu/XYRobot","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mownier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-24T02:53:02.000Z","updated_at":"2024-04-15T02:18:19.000Z","dependencies_parsed_at":"2022-08-03T15:09:57.426Z","dependency_job_id":null,"html_url":"https://github.com/mownier/MONActivityIndicatorView","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mownier%2FMONActivityIndicatorView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mownier%2FMONActivityIndicatorView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mownier%2FMONActivityIndicatorView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mownier%2FMONActivityIndicatorView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mownier","download_url":"https://codeload.github.com/mownier/MONActivityIndicatorView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411239,"owners_count":20934653,"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":["objective-c","uiactivityindicatorview"],"created_at":"2024-10-11T08:09:28.124Z","updated_at":"2025-04-05T23:12:08.639Z","avatar_url":"https://github.com/mownier.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MONActivityIndicatorView\n\nMONActivityIndicatorView is an awesome custom activity indicator view for iOS.\n\n![MONActivityIndicatorView] (https://raw.github.com/mownier/MONActivityIndicatorView/master/MONActivityIndicatorView-Screenshot.gif)\n\n## Installation\n\n### Manual Install\n* Copy and add the files `MONActivityIndicatorView.h` and `MONActivityIndicatorView.m` to your project.\n* Add the **QuartzCore** framework to your project.\n* Then do, `import MONActivityIndicatorView.h`\n\n### From CocoaPods\n* Add `pod 'MONActivityIndicatorView'` to your Podfile.\n* Then `pod install` in the terminal.\n\n## Usage\n\n### Initialization\n``` objective-c\n- (void)viewDidLoad {\n  [super viewDidLoad];\n\n  MONActivityIndicatorView *indicatorView = [[MONActivityIndicatorView alloc] init];\n  [self.view addSubview:indicatorView];\n}\n```\n\n### Toggling Indicator\n``` objective-c\n[indicatorView startAnimating];\n[indicatorView stopAnimating];\n```\n\n\n## Customization\n\n### Default Property Values\n* Animation delay           : `delay           = 0.2`\n* Animation duration        : `duration        = 0.8`\n* Number of circles         : `numberOfCircles = 5`\n* Circle's radius           : `radius          = 10`\n* Circle's internal spacing : `internalSpacing = 5`\n* Circle's background Color : `defaultColor    = [UIColor lightGrayColor]`\n\n\n### Custom Property Values\n``` objective-c\n- (void)viewDidLoad {\n  [super viewDidLoad];\n  \n  MONActivityIndicatorView *indicatorView = [[MONActivityIndicatorView alloc] init];\n  indicatorView.numberOfCircles = 3;\n  indicatorView.radius = 20;\n  indicatorView.internalSpacing = 3;\n  indicatorView.duration = 0.5;\n  indicatorView.delay = 0.5\n  indicatorView.center = self.view.center;\n  [self.view addSubview:indicatorView];\n  [indicatorView startAnimating];\n}\n```\n\n### Custom Circle's Background Color\nFirst, assign the `MONActivityIndicatorViewDelegate` protocol to a view controller. Then, implement the method `activityIndicatorView:circleBackgroundColorAtIndex:`\n``` objective-c\n@interface ViewController : UIViewController \u003cMONActivityIndicatorViewDelegate\u003e\n\n@end\n\n@implementation ViewController\n\n- (void)viewDidLoad {\n  [super viewDidLoad];\n  \n  MONActivityIndicatorView *indicatorView = [[MONActivityIndicatorView alloc] init];\n  indicatorView.delegate = self;\n  indicatorView.numberOfCircles = 3;\n  indicatorView.radius = 20;\n  indicatorView.internalSpacing = 3;\n  indicatorView.duration = 0.5;\n  indicatorView.delay = 0.5\n  indicatorView.center = self.view.center;\n  [self.view addSubview:indicatorView];\n  [indicatorView startAnimating];\n}\n\n- (UIColor *)activityIndicatorView:(MONActivityIndicatorView *)activityIndicatorView\n      circleBackgroundColorAtIndex:(NSUInteger)index {\n  // For a random background color for a particular circle\n  CGFloat red   = (arc4random() % 256)/255.0;\n  CGFloat green = (arc4random() % 256)/255.0;\n  CGFloat blue  = (arc4random() % 256)/255.0;\n  CGFloat alpha = 1.0f;\n  return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];\n}\n\n@end\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmownier%2Fmonactivityindicatorview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmownier%2Fmonactivityindicatorview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmownier%2Fmonactivityindicatorview/lists"}