{"id":15570748,"url":"https://github.com/keith/kslabel","last_synced_at":"2025-10-08T01:07:43.522Z","repository":{"id":5511103,"uuid":"6711611","full_name":"keith/KSLabel","owner":"keith","description":"A drop in subclass of NSTextField for programmatically created labels.","archived":false,"fork":false,"pushed_at":"2015-02-14T06:44:20.000Z","size":168,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-03T09:42:05.078Z","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/keith.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":"2012-11-15T20:58:51.000Z","updated_at":"2019-09-01T06:06:21.000Z","dependencies_parsed_at":"2022-08-19T15:00:57.732Z","dependency_job_id":null,"html_url":"https://github.com/keith/KSLabel","commit_stats":null,"previous_names":["keithbsmiley/kslabel"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/keith/KSLabel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2FKSLabel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2FKSLabel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2FKSLabel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2FKSLabel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keith","download_url":"https://codeload.github.com/keith/KSLabel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2FKSLabel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278094702,"owners_count":25928952,"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","status":"online","status_checked_at":"2025-10-02T02:00:08.890Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-02T17:43:45.094Z","updated_at":"2025-10-03T00:31:23.955Z","avatar_url":"https://github.com/keith.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## KSLabel\n\nA dead simple class for when you need to create a simple label\nprogrammatically.\n\n## Methods\n\nThe only custom method available is\n\n```objc\n- (instancetype)initWithAttributedString:(NSAttributedString *)string\n                                  inView:(NSView *)view;\n```\n\nThe attributed string should be an `NSAttributedString` with whatever\nattributes you want to be displayed. **Be sure to set the\n`NSFontAttributeName` key**\n\nThe passed `NSView` should be the view the label will be added to. The\nlabel will be setup to be centered within the passed view.\n\nYou can also set `notificationToPost` with the name of an\n`NSNotification` to be posted when the label is clicked.\n\nExample:\n\n```objc\nNSDictionary *attributes = @{NSFontAttributeName: [NSFont systemFontOfSize:[NSFont systemFontSize]]};\nNSAttributedString *string = [[NSAttributedString alloc] initWithString:@\"My string\"\n                                                             attributes:attributes];\nKSLabel *mylabel = [[KSLabel alloc] initWithAttributedString:string\n                                                      inView:titleBarView];\nmylabel.notificationToPost = @\"Some String!\";\nNSNotification *notification = [NSNotification notificationWithName:@\"someName\"\n                                                             object:someObject\n                                                           userInfo:@{@\"someKey\": @\"someObject\"}]\nmyLabel.NSNotificationToPost = notification;\nmyLabel.action = @selector(doSomething:);\nmyLabel.cursor = [NSCursor pointingHandCursor];\n[myView addSubview:mylabel];\n```\n\n## [CocoaPods](http://cocoapods.org/)\n\nIf you're using CocoaPods, which you should be, just add this to your\nPodfile.\n\n\tpod 'KSLabel'\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeith%2Fkslabel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeith%2Fkslabel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeith%2Fkslabel/lists"}