{"id":13611513,"url":"https://github.com/lilei644/LLBootstrapButton","last_synced_at":"2025-04-13T04:34:47.498Z","repository":{"id":35678279,"uuid":"39954064","full_name":"lilei644/LLBootstrapButton","owner":"lilei644","description":"Bootstrap 3.0扁平化风格按钮，自带图标，一句代码直接调用！！！","archived":false,"fork":false,"pushed_at":"2016-03-05T01:16:37.000Z","size":1167,"stargazers_count":188,"open_issues_count":2,"forks_count":31,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-07T01:46:14.708Z","etag":null,"topics":["bootstrap","button"],"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/lilei644.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":"2015-07-30T14:12:49.000Z","updated_at":"2023-08-20T12:15:31.000Z","dependencies_parsed_at":"2022-08-17T19:10:36.474Z","dependency_job_id":null,"html_url":"https://github.com/lilei644/LLBootstrapButton","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lilei644%2FLLBootstrapButton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lilei644%2FLLBootstrapButton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lilei644%2FLLBootstrapButton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lilei644%2FLLBootstrapButton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lilei644","download_url":"https://codeload.github.com/lilei644/LLBootstrapButton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665157,"owners_count":21142118,"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":["bootstrap","button"],"created_at":"2024-08-01T19:01:56.768Z","updated_at":"2025-04-13T04:34:47.175Z","avatar_url":"https://github.com/lilei644.png","language":"Objective-C","readme":"# LLBootstrapButton\nBootstrap 3.0扁平化风格按钮，一句代码调用\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;以前开发过web端的同学可能用过Twitter公司出的一个前端框架Bootstrap,当时刚接触的时候是2.0的版本，后来是3.0,从立体化的风格到现在扁平化的风格，一直以一种简约大方的设计风格体现，深受开发者的喜爱\u003cbr\u003e\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;对于我们这种没有美工妹纸当女票的人来说移动开发就是悲剧，所以后来发现Android开发中也有Bootstrap和BootstrapButton两个框架，显示风格和网页扁平简约的风格一样。于是最近将BootstrapButton部分移植了一个OC版本，以便喜欢这种风格的同学方便使用，维持了原本web端自带的图标字体(fontawesome)，可一键调用！！！\u003cbr\u003e\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;先上效果图，共6种风格，每种分正常，高亮，也可添加图标\u003cbr\u003e\u003cbr\u003e\n   ![image](https://github.com/lilei644/LLBootstrapButton/blob/master/Img/LLBootstrapButton.png)\n## 使用方法\n* CocoaPods(若未获取成功需重新 pod setup )\n```\npod \"LLBootstrapButton\"\n```\n\u0026nbsp;\u0026nbsp;CocoaPods导入后则无需手动导入Bundle,可直接使用\n* 导入\n```\n#import \"LLBootstrap.h\"\n```\n### 添加背景效果\n```\n[button bs_configureAsDefaultStyle]\n```\n\u0026nbsp;\u0026nbsp;分为6中风格,默认是可点击\u003cbr\u003e\n```\n[button bs_configureAsDefaultStyle]              // 默认\n[button bs_configureAsPrimaryStyle]              // 原色\n[button bs_configureAsSuccessStyle]              // 成功\n[button bs_configureAsInfoStyle]                 // 消息\n[button bs_configureAsWarningStyle]              // 警告\n[button bs_configureAsDangerStyle]               // 危险\n```\n\n\u003cbr\u003e\u003cbr\u003e\n### 添加图标\n* 导入Bundle到项目中(若使用CocoaPods集成则无需此操作)\u003cbr\u003e\n   ![image](https://github.com/lilei644/LLBootstrapButton/blob/master/Img/addfont.png) \n* 调用方法（根据图标代码选择图标）\u003cbr\u003e\n```\n// 使用图标签需要先设置字体\nUIFont *font = [UIFont bs_awesomeFontOfSize:16.f];\n```\n\u003cbr\u003e\n```\n[button.titleLabel setFont:[UIFont bs_awesomeFontOfSize:16.f]];\n// 选择苹果图标，置前\n[button setTitle:[NSString stringWithFormat:@\"%@ Primary\", @\"fa-apple\".bs_awesomeIconRepresentation] forState:UIControlStateNormal];    \n```\n\u003cbr\u003e\n```\n// UITextView直接显示图标\n[textview  setText:[NSString stringWithFormat:@\"这是一个%@图标\",@\"fa-github-alt\".bs_awesomeIconRepresentation]];    \n```\n* 支持图标可达300多种，符合大部分需求\u003cbr\u003e\n   ![image](https://github.com/lilei644/LLBootstrapButton/blob/master/Img/fontIcon.png)\n\u0026nbsp;\u0026nbsp;图标代码打开资源文件中的htm文件即可显示所有图标\u003cbr\u003e\n`使用注意：由于图标为文字生成，所以必须设置字体`\n\u003cbr\u003e\u003cbr\u003e\n\n### 致谢\n* 在此特别感谢[阳神Sunny](https://github.com/sunnyxx)对新人的指导\u003cbr\u003e\u003cbr\u003e\n","funding_links":[],"categories":["Objective-C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flilei644%2FLLBootstrapButton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flilei644%2FLLBootstrapButton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flilei644%2FLLBootstrapButton/lists"}