{"id":2145,"url":"https://github.com/cwRichardKim/RKNotificationHub","last_synced_at":"2025-08-02T23:32:00.856Z","repository":{"id":21370934,"uuid":"24688259","full_name":"cwRichardKim/RKNotificationHub","owner":"cwRichardKim","description":"Make any UIView a full fledged notification center","archived":false,"fork":false,"pushed_at":"2018-11-02T16:54:46.000Z","size":487,"stargazers_count":3036,"open_issues_count":3,"forks_count":327,"subscribers_count":72,"default_branch":"master","last_synced_at":"2024-10-29T15:27:27.970Z","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/cwRichardKim.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":"2014-10-01T17:36:18.000Z","updated_at":"2024-10-25T16:14:41.000Z","dependencies_parsed_at":"2022-07-30T03:47:50.647Z","dependency_job_id":null,"html_url":"https://github.com/cwRichardKim/RKNotificationHub","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwRichardKim%2FRKNotificationHub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwRichardKim%2FRKNotificationHub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwRichardKim%2FRKNotificationHub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwRichardKim%2FRKNotificationHub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cwRichardKim","download_url":"https://codeload.github.com/cwRichardKim/RKNotificationHub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228503126,"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:05.844Z","updated_at":"2024-12-06T17:30:44.603Z","avatar_url":"https://github.com/cwRichardKim.png","language":"Objective-C","funding_links":[],"categories":["Notification","awesome-ios ##","Objective-C","Objective-C  Stars 1000以内排名整理","UI"],"sub_categories":["Other free courses","Font","Other Testing"],"readme":"RKNotificationHub\n=================\n\nA way to quickly add a notification icon to a UIView (iOS6 and up). [Support](http://cwrichardkim.com)\n\n![demo](http://i.imgur.com/SpE2BQv.gif)\n\nCode:\n``` objc\n  RKNotificationHub* hub = [[RKNotificationHub alloc]initWithView:yourView]; // sets the count to 0\n  [hub increment]; // increments the count to 1, making the notification visible\n```\n\n### Pod\n```\n    pod 'RKNotificationHub'\n```\n\n### USAGE\n![increment](http://i.imgur.com/zpgkNtE.gif)\n``` objc\n  [hub increment];\n```\n``` objc\n  -(void)increment;\n  -(void)incrementBy:(int)amount;\n  -(void)decrement;\n  -(void)decrementBy:(int)amount;\n  @property (nonatomic, assign) int count; //%%% set to a certain number\n```\n\n__Combine Actions!__\n\n![blink](http://i.imgur.com/boGyL9T.gif)\n``` objc\n  [hub increment];\n  [hub pop];\n```\n\n### CUSTOMIZE\n![blink](http://i.imgur.com/Ftbrh87.gif)\n``` objc\n  //%%% COLOR\n  [hub setCircleColor:[UIColor colorWithRed:0.98 green:0.66 blue:0.2 alpha:1]\n           labelColor:[UIColor whiteColor]];\n```\n\n![frame](http://i.imgur.com/6w9WaO4.png?1)\n```objc\n  //%%% CIRCLE FRAME\n  [hub setCircleAtFrame:CGRectMake(-10, -10, 30, 30)]; //frame relative to the view you set it to\n\n  //%%% MOVE FRAME\n  [hub moveCircleByX:-5 Y:5]; // moves the circle 5 pixels left and down from its current position\n\n  //%%% CIRCLE SIZE\n  [hub scaleCircleSizeBy:2]; // doubles the size of the circle, keeps the same center\n```\n\n![blank](http://i.imgur.com/rhiKOPH.png)\n``` objc\n  //%%% BLANK BADGE\n  [hub hideCount];\n  /* shoutout to imkevinxu for this suggestion */\n```\n\n\n### TROUBLESHOOTING\n**Notification isn't showing up!**\n* If the hub value is \u003c 1, the circle hides.  Try calling `[increment]`\n* Make sure the view you set the hub to is visible (i.e. did you call `[self.view addSubview: yourView]`?)\n* Make sure you didn't call `[hideCount]` anywhere. Call `[showCount]` to counter this\n\n**It isn't incrementing / decrementing properly!**\n* I've written it so that any count \u003c 1 doesn't show up. If you need help customizing this, reach out to me\n\n**The circle is in a weird place**\n* If you want to resize the circle, use `[scaleCircleSizeBy:]`. 0.5 will give you half the size, 2 will give you double\n* If the circle is just a few pixels off, use `[moveCircleByX: Y:]`. This shifts the circle by the number of pixels given\n* If you want to manually set the circle, call `[setCircleAtFrame:]` and give it your own CGRect\n\n**Something else isn't working properly**\n* Send me a tweet @cwRichardKim with #RKNotificationHub so that other people can search these issues too\n* Use github's issue reporter on the right\n* Send me an email cwRichardKim@gmail.com (might take a few days)\n\n\n### Updates\n* 1.0.0 first release with cocoapod\n* 1.0.1 cocoapod allows iOS 7.0\n* 1.0.2 added \"hideCount\", \"showCount\", and \"count\" methods, allowing indeterminate badges with no number\n* 1.0.5 added bubble expansion for larger numbers [(gif)](http://i.imgur.com/cpQuShT.gif)\n* 2.0.0 changed count to `NSUInteger` (removed support for negative counts), made local constants `static const`\n* 2.0.1 iOS 6 compatability\n* 2.0.2 changed count back to 'int' for better swift compatability\n* 2.0.4 fixed cocoapod update issue\n\n### Areas for Improvements / involvement\n* A mechanism for adding a custom animation\n* Singleton option\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FcwRichardKim%2FRKNotificationHub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FcwRichardKim%2FRKNotificationHub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FcwRichardKim%2FRKNotificationHub/lists"}