Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
lixiang1994 committed Oct 11, 2021
1 parent 6b2aa07 commit 83c3cae
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,35 +57,35 @@ import UIAdapter
Here are some usage examples. All devices are also available as simulators:


### Auto
### Zoom


AutoLayout (SnapKit):

```swift
private func setupLayout() {
cardView.snp.makeConstraints { (make) in
make.top.equalTo(16.auto())
make.left.right.equalToSuperview().inset(15.auto())
make.bottom.equalTo(-26.auto())
make.top.equalTo(16.zoom())
make.left.right.equalToSuperview().inset(15.zoom())
make.bottom.equalTo(-26.zoom())
}

lineView.snp.makeConstraints { (make) in
make.left.right.equalToSuperview().inset(15.auto())
make.left.right.equalToSuperview().inset(15.zoom())
make.top.equalTo(titleLabel.snp.bottom)
make.height.equalTo(1)
}

titleLabel.snp.makeConstraints { (make) in
make.top.equalToSuperview()
make.left.equalTo(15.auto())
make.height.equalTo(48.auto())
make.left.equalTo(15.zoom())
make.height.equalTo(48.zoom())
}

stateLabel.snp.makeConstraints { (make) in
make.top.equalTo(lineView).offset(10.auto())
make.left.equalTo(15.auto())
make.height.equalTo(15.auto())
make.top.equalTo(lineView).offset(10.zoom())
make.left.equalTo(15.zoom())
make.height.equalTo(15.zoom())
}
}
```
Expand All @@ -94,7 +94,7 @@ Property (Then):

```swift
private lazy var cardView = UIView().then {
$0.cornerRadius = 6.auto()
$0.cornerRadius = 6.zoom()
$0.backgroundColor = .white
}

Expand All @@ -104,12 +104,12 @@ private lazy var lineView = UIView().then {

private lazy var titleLabel = UILabel().then {
$0.textColor = .black
$0.font = .systemFont(ofSize: 20.auto(), weight: .medium)
$0.font = .systemFont(ofSize: 20.zoom(), weight: .medium)
}

private lazy var stateLabel = UILabel().then {
$0.textColor = .gray
$0.font = .systemFont(ofSize: 12.auto(), weight: .medium)
$0.font = .systemFont(ofSize: 12.zoom(), weight: .medium)
}
```

Expand Down
26 changes: 13 additions & 13 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,35 +54,35 @@ import UIAdapter

下面是一些简单示例. 支持所有设备和模拟器:

### Auto
### Zoom


AutoLayout (SnapKit):

```swift
private func setupLayout() {
cardView.snp.makeConstraints { (make) in
make.top.equalTo(16.auto())
make.left.right.equalToSuperview().inset(15.auto())
make.bottom.equalTo(-26.auto())
make.top.equalTo(16.zoom())
make.left.right.equalToSuperview().inset(15.zoom())
make.bottom.equalTo(-26.zoom())
}

lineView.snp.makeConstraints { (make) in
make.left.right.equalToSuperview().inset(15.auto())
make.left.right.equalToSuperview().inset(15.zoom())
make.top.equalTo(titleLabel.snp.bottom)
make.height.equalTo(1)
}

titleLabel.snp.makeConstraints { (make) in
make.top.equalToSuperview()
make.left.equalTo(15.auto())
make.height.equalTo(48.auto())
make.left.equalTo(15.zoom())
make.height.equalTo(48.zoom())
}

stateLabel.snp.makeConstraints { (make) in
make.top.equalTo(lineView).offset(10.auto())
make.left.equalTo(15.auto())
make.height.equalTo(15.auto())
make.top.equalTo(lineView).offset(10.zoom())
make.left.equalTo(15.zoom())
make.height.equalTo(15.zoom())
}
}
```
Expand All @@ -91,7 +91,7 @@ private func setupLayout() {

```swift
private lazy var cardView = UIView().then {
$0.cornerRadius = 6.auto()
$0.cornerRadius = 6.zoom()
$0.backgroundColor = .white
}

Expand All @@ -101,12 +101,12 @@ private lazy var lineView = UIView().then {

private lazy var titleLabel = UILabel().then {
$0.textColor = .black
$0.font = .systemFont(ofSize: 20.auto(), weight: .medium)
$0.font = .systemFont(ofSize: 20.zoom(), weight: .medium)
}

private lazy var stateLabel = UILabel().then {
$0.textColor = .gray
$0.font = .systemFont(ofSize: 12.auto(), weight: .medium)
$0.font = .systemFont(ofSize: 12.zoom(), weight: .medium)
}
```

Expand Down

0 comments on commit 83c3cae

Please sign in to comment.