定制属于自己的徽章 -- shields

Shields

Github Search shields

Github shields

Introduction

Customize the personalized badge effect with simple configuration.

build status service-test status coverage Total alerts chat on Discord

Use

1. Config Label text and Message text – Default / Logo

Shields *shields = [[Shields alloc] initWithFrame:CGRectMake(0, 0, 320, 40) style:ShieldsDefault];
[shields configLabel:@"CreaterOS" message:@"v1.0"];
shields.center = self.view.center;
[self.view addSubview:shields];

2. Config Label Font Color – Default / Logo

Shields *shields = [[Shields alloc] initWithFrame:CGRectMake(0, 0, 320, 40) style:ShieldsDefault];
[shields configLabel:@"CreaterOS" message:@"v1.0" labelColor:[UIColor colorWithRed: 86/255.0 green: 88/255.0 blue: 224/255.0 alpha:1.000]];
shields.center = self.view.center;
[self.view addSubview:shields];

3. Config Message Font Color – Default / Logo

Shields *shields = [[Shields alloc] initWithFrame:CGRectMake(0, 0, 320, 40) style:ShieldsDefault];
[shields configLabel:@"CreaterOS" message:@"v1.0" messageColor:[UIColor colorWithRed: 86/255.0 green: 88/255.0 blue: 224/255.0 alpha:1.000]];
shields.center = self.view.center;
[self.view addSubview:shields];

4.Config Label Background Color – Default / Logo

Shields *shields = [[Shields alloc] initWithFrame:CGRectMake(0, 0, 320, 40) style:ShieldsDefault];
[shields configLabel:@"CreaterOS" message:@"v1.0" labelBackgroundColor:[UIColor colorWithRed: 241/255.0 green: 176/255.0 blue: 101/255.0 alpha:1.000]];
shields.center = self.view.center;
[self.view addSubview:shields];

5.Config Message Background Color – Default / Logo

Shields *shields = [[Shields alloc] initWithFrame:CGRectMake(0, 0, 320, 40) style:ShieldsDefault];
[shields configLabel:@"CreaterOS" message:@"v1.0" messageBackgroundColor:[UIColor colorWithRed: 241/255.0 green: 176/255.0 blue: 101/255.0 alpha:1.000]];
shields.center = self.view.center;
[self.view addSubview:shields];

6.Config Label And Message Background Color – Default / Logo

Shields *shields = [[Shields alloc] initWithFrame:CGRectMake(0, 0, 320, 40) style:ShieldsDefault];
[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]];
shields.center = self.view.center;
[self.view addSubview:shields];

7.Config Label And Message – Default / Logo

Shields *shields = [[Shields alloc] initWithFrame:CGRectMake(0, 0, 320, 40) style:ShieldsDefault];
[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];
shields.center = self.view.center;
[self.view addSubview:shields];

8. Config Logo

Shields *shields = [[Shields alloc] initWithFrame:CGRectMake(0, 0, 320, 40) style:ShieldsLogo];
[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)];
shields.center = self.view.center;
[self.view addSubview:shields];

MIT License

MIT License

Contribute to this project

If you have a feature request or bug report, please feel free to send 863713745@qq.com to upload the problem, and we will provide you with revisions and help as soon as possible. Thank you very much for your support.

Security Disclosure

If you have found the Shields security vulnerabilities and vulnerabilities that need to be modified, you should email them to 863713745@qq.com as soon as possible. thank you for your support.

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值