Skip to content

Commit 98cb826

Browse files
authored
Create README.md
1 parent e89fada commit 98cb826

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<p align="center">
2+
<img src="https://user-images.githubusercontent.com/6329656/48312433-faebea00-e5e0-11e8-9f0d-6bd63e830c1c.png" alt="PaddingLabel logo" width="444">
3+
</p>
4+
5+
# PaddingLabel
6+
7+
**PaddingLabel** is a customizable UILabel subclass for iOS, written in Objective-C, that allows you to add padding to your labels easily.
8+
9+
## Features
10+
11+
- Add custom padding to UILabels.
12+
- Easy integration into any iOS project.
13+
- Fully customizable appearance.
14+
15+
## Requirements
16+
17+
- **iOS** 8.0 or later
18+
- **Xcode** 9.0 or later
19+
20+
## Installation
21+
22+
To integrate PaddingLabel into your Xcode project, simply copy the `PaddingLabel` files into your project directory.
23+
24+
## Usage
25+
26+
### Programmatically
27+
28+
Here's a quick example of how to use `PaddingLabel` programmatically:
29+
30+
```objective-c
31+
#import "PaddingLabel.h"
32+
33+
// Create an instance of PaddingLabel
34+
PaddingLabel *bottomLabel = [PaddingLabel new];
35+
36+
// Set text and appearance
37+
bottomLabel.text = @"hello world";
38+
bottomLabel.font = [UIFont fontWithName:@"Nunito Sans" size:16];
39+
bottomLabel.textColor = [UIColor colorWithRed:52.52/255.0 green:62.15/255.0 blue:88.99/255.0 alpha:1.0];
40+
bottomLabel.backgroundColor = [UIColor colorWithHexString:@"#F3F4F7"];
41+
bottomLabel.textInsets = UIEdgeInsetsMake(12, 24, 12, 0); // top, left, bottom, right
42+
43+
// Customize layer properties
44+
bottomLabel.layer.cornerRadius = 4.0;
45+
bottomLabel.layer.masksToBounds = YES;
46+
47+
// Add to view
48+
[self.view addSubview:bottomLabel];

0 commit comments

Comments
 (0)