Skip to content

Commit 10b5754

Browse files
committed
feat: shields v1.0
shields v1.0 # - type: feat(新特性), fix(修改问题), docs(文档修改), style(代码格式修改, 注意不是 css 修改), refactor(代码重构), test(测试), chore(其他修改, 比如构建流程, 依赖管理) # - scope: (可以为空) 影响的的范围 all :表示影响面大 ,如修改了网络框架 会对真个程序产生影响 loation: 表示影响小,某个小小的功能 module:表示会影响某个模块 如登录模块、首页模块 、用户管理模块等等 # - subject 提交描述 # - body 具体的修改信息 应该尽量详细 # - footer 放置写备注啥的,如果是 bug ,可以把bug id放入
0 parents  commit 10b5754

File tree

38 files changed

+1829
-0
lines changed

38 files changed

+1829
-0
lines changed

README.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Shields
2+
3+
## Introduction
4+
5+
Customize the personalized badge effect with simple configuration.
6+
7+
<a href="https://github.com/badges/shields/graphs/contributors" alt="Contributors">
8+
<img src="https://img.shields.io/github/contributors/badges/shields" /></a>
9+
<a href="#backers" alt="Backers on Open Collective">
10+
<img src="https://img.shields.io/opencollective/backers/shields" /></a>
11+
<a href="#sponsors" alt="Sponsors on Open Collective">
12+
<img src="https://img.shields.io/opencollective/sponsors/shields" /></a>
13+
<a href="https://github.com/badges/shields/pulse" alt="Activity">
14+
<img src="https://img.shields.io/github/commit-activity/m/badges/shields" /></a>
15+
<a href="https://circleci.com/gh/badges/shields/tree/master">
16+
<img src="https://img.shields.io/circleci/project/github/badges/shields/master" alt="build status"></a>
17+
<a href="https://circleci.com/gh/badges/daily-tests">
18+
<img src="https://img.shields.io/circleci/project/github/badges/daily-tests?label=service%20tests"
19+
alt="service-test status"></a>
20+
<a href="https://coveralls.io/github/badges/shields">
21+
<img src="https://img.shields.io/coveralls/github/badges/shields"
22+
alt="coverage"></a>
23+
<a href="https://lgtm.com/projects/g/badges/shields/alerts/">
24+
<img src="https://img.shields.io/lgtm/alerts/g/badges/shields"
25+
alt="Total alerts"/></a>
26+
<a href="https://discord.gg/HjJCwm5">
27+
<img src="https://img.shields.io/discord/308323056592486420?logo=discord"
28+
alt="chat on Discord"></a>
29+
30+
## Use
31+
32+
### 1. Config Label text and Message text -- Default / Logo
33+
34+
```objective-c
35+
Shields *shields = [[Shields alloc] initWithFrame:CGRectMake(0, 0, 320, 40) style:ShieldsDefault];
36+
[shields configLabel:@"CreaterOS" message:@"v1.0"];
37+
shields.center = self.view.center;
38+
[self.view addSubview:shields];
39+
```
40+
41+
### 2. Config Label Font Color -- Default / Logo
42+
43+
```objective-c
44+
Shields *shields = [[Shields alloc] initWithFrame:CGRectMake(0, 0, 320, 40) style:ShieldsDefault];
45+
[shields configLabel:@"CreaterOS" message:@"v1.0" labelColor:[UIColor colorWithRed: 86/255.0 green: 88/255.0 blue: 224/255.0 alpha:1.000]];
46+
shields.center = self.view.center;
47+
[self.view addSubview:shields];
48+
```
49+
50+
### 3. Config Message Font Color -- Default / Logo
51+
52+
```objective-c
53+
Shields *shields = [[Shields alloc] initWithFrame:CGRectMake(0, 0, 320, 40) style:ShieldsDefault];
54+
[shields configLabel:@"CreaterOS" message:@"v1.0" messageColor:[UIColor colorWithRed: 86/255.0 green: 88/255.0 blue: 224/255.0 alpha:1.000]];
55+
shields.center = self.view.center;
56+
[self.view addSubview:shields];
57+
```
58+
59+
### 4.Config Label Background Color -- Default / Logo
60+
61+
```objective-c
62+
Shields *shields = [[Shields alloc] initWithFrame:CGRectMake(0, 0, 320, 40) style:ShieldsDefault];
63+
[shields configLabel:@"CreaterOS" message:@"v1.0" labelBackgroundColor:[UIColor colorWithRed: 241/255.0 green: 176/255.0 blue: 101/255.0 alpha:1.000]];
64+
shields.center = self.view.center;
65+
[self.view addSubview:shields];
66+
```
67+
68+
### 5.Config Message Background Color -- Default / Logo
69+
70+
```objective-c
71+
Shields *shields = [[Shields alloc] initWithFrame:CGRectMake(0, 0, 320, 40) style:ShieldsDefault];
72+
[shields configLabel:@"CreaterOS" message:@"v1.0" messageBackgroundColor:[UIColor colorWithRed: 241/255.0 green: 176/255.0 blue: 101/255.0 alpha:1.000]];
73+
shields.center = self.view.center;
74+
[self.view addSubview:shields];
75+
```
76+
77+
### 6.Config Label And Message Background Color -- Default / Logo
78+
79+
```objective-c
80+
Shields *shields = [[Shields alloc] initWithFrame:CGRectMake(0, 0, 320, 40) style:ShieldsDefault];
81+
[shields configLabel:@"CreaterOS" message:@"v1.0" labelBackgroundColor:[UIColor colorWithRed: 241/255.0 green: 176/255.0 blue: 101/255.0 alpha:1.000] messageBackgroundColor:[UIColor colorWithRed: 86/255.0 green: 88/255.0 blue: 224/255.0 alpha:1.000]];
82+
shields.center = self.view.center;
83+
[self.view addSubview:shields];
84+
```
85+
86+
### 7.Config Label And Message -- Default / Logo
87+
88+
```objective-c
89+
Shields *shields = [[Shields alloc] initWithFrame:CGRectMake(0, 0, 320, 40) style:ShieldsDefault];
90+
[shields configLabel:@"CreaterOS" message:@"v1.0" labelBackgroundColor:[UIColor colorWithRed: 86/255.0 green: 88/255.0 blue: 224/255.0 alpha:1.000] messageBackgroundColor:[UIColor colorWithRed: 241/255.0 green: 176/255.0 blue: 101/255.0 alpha:1.000] labelColor:UIColor.whiteColor messageColor:UIColor.whiteColor];
91+
shields.center = self.view.center;
92+
[self.view addSubview:shields];
93+
```
94+
95+
### 8. Config Logo
96+
97+
```objective-c
98+
Shields *shields = [[Shields alloc] initWithFrame:CGRectMake(0, 0, 320, 40) style:ShieldsLogo];
99+
[shields configLabel:@"CreaterOS" message:@"v1.0" labelBackgroundColor:[UIColor colorWithRed: 241/255.0 green: 176/255.0 blue: 101/255.0 alpha:1.000] messageBackgroundColor:[UIColor colorWithRed: 193/255.0 green: 241/255.0 blue: 172/255.0 alpha:1.000] labelColor:[UIColor colorWithRed: 242/255.0 green: 242/255.0 blue: 246/255.0 alpha:1.000] messageColor:[UIColor colorWithRed: 242/255.0 green: 242/255.0 blue: 246/255.0 alpha:1.000] logo:[UIImage imageNamed:@"lanmei"] logoWidth:15 logoPosition:CGPointMake(10, 10)];
100+
shields.center = self.view.center;
101+
[self.view addSubview:shields];
102+
```
103+
104+
## Contribute to this project
105+
106+
If you have a feature request or bug report, please feel free to send [[email protected]](mailto:[email protected]) to upload the problem, and we will provide you with revisions and help as soon as possible. Thank you very much for your support.
107+
108+
## Security Disclosure
109+
110+
If you have found the Shields security vulnerabilities and vulnerabilities that need to be modified, you should email them to [[email protected]](mailto:[email protected]) as soon as possible. thank you for your support.

0 commit comments

Comments
 (0)