{"id":13849096,"url":"https://github.com/lakesoft/LKBadgeView","last_synced_at":"2025-07-12T15:32:56.223Z","repository":{"id":1722493,"uuid":"2452963","full_name":"lakesoft/LKBadgeView","owner":"lakesoft","description":"Custom badge view","archived":false,"fork":false,"pushed_at":"2014-04-29T11:24:45.000Z","size":578,"stargazers_count":371,"open_issues_count":3,"forks_count":53,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-06-27T18:43:45.434Z","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/lakesoft.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":"2011-09-25T02:35:09.000Z","updated_at":"2025-05-21T18:32:24.000Z","dependencies_parsed_at":"2022-09-07T17:50:10.041Z","dependency_job_id":null,"html_url":"https://github.com/lakesoft/LKBadgeView","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lakesoft/LKBadgeView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lakesoft%2FLKBadgeView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lakesoft%2FLKBadgeView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lakesoft%2FLKBadgeView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lakesoft%2FLKBadgeView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lakesoft","download_url":"https://codeload.github.com/lakesoft/LKBadgeView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lakesoft%2FLKBadgeView/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265013556,"owners_count":23698061,"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-08-04T19:01:07.843Z","updated_at":"2025-07-12T15:32:55.765Z","avatar_url":"https://github.com/lakesoft.png","language":"Objective-C","readme":"Custom Badge View\n=================\n\nLKBadgeView class draws text on round rect 'badge'.\n\n![](https://github.com/lakesoft/LKBadgeView/raw/master/Docs/screenshot0.png)\n\n[*See japanese document](http://cocoadays.blogspot.com/2011/09/blog-post.html \"_blank_\")\n\nInstallation\n------------\n\nThe library is available through [CocoaPods](http://cocoapods.org), to install\nit simply add the following line to your Podfile:\n\n    pod \"LKBadgeView\", :git =\u003e 'https://github.com/lakesoft/LKBadgeView.git'\n\n\n\nUsage\n-----\n\nLKBadgeView is subclass of UIView. So you can add the instance to some view.\n\n\tLKBadgeView* badgeView =\n\t\t[[[LKBadgeView alloc] initWithFrame:CGRectMake(100, 200, 50, 20)] autorelease];\n\t[self.view addSubview:badgeView];\n\tbadgeView.text = @\"23\";\n\nYou can use this class in XIB. The sample application use this way.\n\n\nCustomize\n---------\nThe below properties can customize the view's behaivior.\n\n### Horizontal position\n\t@property (nonatomic, assign) LKBadgeViewHorizontalAlignment horizontalAlignment;\n\nleft/center/right alignments are available.  \n(Default) LKBadgeViewHorizontalAlignmentCenter\n\n![](https://github.com/lakesoft/LKBadgeView/raw/master/Docs/0004.png)\n\n( The background color is convenient description )\n\n### Minimum size\nMinimum size has 2 way mode.\n\n\t@property (nonatomic, assign) LKBadgeViewWidthMode widthMode;\n\n![](https://github.com/lakesoft/LKBadgeView/raw/master/Docs/0005.png)\n\n* LKBadgeViewWidthModeSmall: The badge shape becomes circle.\n* LKBadgeViewWidthModeStandard: The width is certain fixed size in case of 1 char and 2 chars text. 3 chars and more.\n\n(Default) LKBadgeViewWidthModeStandard\n\n###Color\nText color and badge color are variable.  \n\n\t@property (nonatomic, retain) UIColor* textColor;\n\t@property (nonatomic, retain) UIColor* badgeColor;\n\n(Default) textColor is white, badgeColor is gray.\n\n![](https://github.com/lakesoft/LKBadgeView/raw/master/Docs/0006.png)\n\n###Outline\nLKBadgeView can use outline.\n\n![](https://github.com/lakesoft/LKBadgeView/raw/master/Docs/0007.png)\n\nThe outline property should be YES when you use outline. If the property is no, then the outline does not be drawn. Outline has color property and width property.\n\n\t@property (nonatomic, retain) UIColor* outlineColor;\n\t@property (nonatomic, assign) CGFloat outlineWidth;\n\t@property (nonatomic, assign) BOOL outline;\n\n(Default) outlineColor is gray, outlineWidth is 2.0.\n\nYou can use outline with badgeColor.\n\n![](https://github.com/lakesoft/LKBadgeView/raw/master/Docs/0008.png)\n\n###Shadow\nLKBadgeView can draw a shadow.\n\n![](https://github.com/lakesoft/LKBadgeView/raw/master/Docs/0010.png)\n\nIf the shadow property is YES, then the shadow of the badge is drawn. 'shadowOfOutline' is for outline shadow. 'shadowOfText' is for text shadow.\n\n\t@property (nonatomic, retain) BOOL shadow;\n\t@property (nonatomic, assign) BOOL shadowOfOutline;\n\t@property (nonatomic, assign) BOOL shadowOfText;\n\n(Default) all shadow properties are NO.\n\nEtc\n---\n\n### Truncated\nIf text width is greater than LKBadgeView width, The text is truncated.\n\n![](https://github.com/lakesoft/LKBadgeView/raw/master/Docs/0009.png)\n\n( The background color is convenient description )\n\n### Badge height\nThe height of badge shape is fixed (20px). The value is avaliable as constant. Also class method +badgeHeight is avalible.\n\n\t#define LK_BADGE_VIEW_STANDARD_HEIGHT       20.0\n \t  :\n\t + (CGFloat)badgeHeight;\n\nLKBadgeView height should be same value or more. If LKBadgeView is greater than fixed size (20px), then the badge shape is placed at the center of vertical position in LKBadgeView. Usually the height of LKBadgeView itself is the same as the value and good\n\n\nLicense\n-------\nMIT\n\nCopyright (c) 2011 Hiroshi Hashiguchi\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\nall copies 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\nTHE SOFTWARE.\n\n","funding_links":[],"categories":["Objective-C","etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flakesoft%2FLKBadgeView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flakesoft%2FLKBadgeView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flakesoft%2FLKBadgeView/lists"}