KO
|
EN
gitlite — search
Search
#swift
#react
#php
#python
#machine-learning
#ruby
#android
#plugin
#web
#encryption
#nodejs
#ios
KKPaddingLabel
★ 31
Open GitHub ↗
简易的可视化的添加内边距Label,不影响autolayout
Download README (.md)
Explore Similar Repositories
ckb-sdk-java
:
Java SDK for CKB
ubuntu-tensorflow-pytorch-setup
:
Setup of TensorFlow and PyTorch on Ubuntu 18.04 -- the easy way!
platzi-autenticacion
:
Curso de Autenticación con OAuth
ContinuumArrays.jl
:
A package for representing quasi arrays with continuous indices
refraction
:
Collection of React components used at Quid
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
KKPaddingLabel
?
Download (.md)
KKPaddingLabel === [](https://cocoapods.org/pods/KKPaddingLabel) [](https://cocoapods.org/pods/KKPaddingLabel) [](https://www.jianshu.com/p/57776de0a507) 可以给Label添加内边距,支持xib可视化修改,支持autolayout/masonry约束 blog ------- 简书:https://www.jianshu.com/p/57776de0a507 xib效果 动图 -------  代码效果-灰色背景的Label(见下图), Masonry约束效果相同 ------- KKPaddingLabel *paddingLabel = [[KKPaddingLabel alloc] initWithFrame:CGRectZero]; paddingLabel.text = @"KKPaddingLabel"; paddingLabel.backgroundColor = [UIColor lightGrayColor]; paddingLabel.padding = UIEdgeInsetsMake(10, 10, 10, 10); paddingLabel.cornerRadius = 5.0f; paddingLabel.translatesAutoresizingMaskIntoConstraints = NO; [self.view addSubview:paddingLabel]; [self.view addConstraint:[NSLayoutConstraint constraintWithItem:paddingLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeTop multiplier:1.0 constant:200.0f]]; [self.view addConstraint:[NSLayoutConstraint constraintWithItem:paddingLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeLeft multiplier:1.0 constant:100.0f]];  Cocoapods ----- ``` pod 'KKPaddingLabel' ```