Skip to content

Commit 6a2d4be

Browse files
author
Luc Dion
authored
Merge pull request #50 from albinekcom/patch-1
Add missing syntax highlighting
2 parents 75122c3 + add1e33 commit 6a2d4be

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ The value specifies the vertical center distance from the superview's top edge i
174174

175175
###### Usage Examples:
176176

177-
```
177+
```swift
178178
view.pin.top(20).left(20)
179179
view.pin.top(25%).hCenter(0)
180180
view.pin.left(12).vCenter(100)
@@ -226,7 +226,7 @@ This example is similar to the previous example, but pins edges directly on supe
226226

227227
![](docs/02-example-superview-edge.png)
228228

229-
```
229+
```swift
230230
viewA.pin.top().left().bottom().right().margin(10)
231231
```
232232

@@ -784,7 +784,7 @@ Warnings can be disabled in debug mode too by setting the boolean PinLayoutLogCo
784784

785785
* If the layout line is too long, you can split in multiple lines:
786786

787-
```
787+
```swift
788788
textLabel.pin.below(of: titleLabel)
789789
.right(of: statusIcon).left(of: accessoryView)
790790
.above(of: button).marginHorizontal(10)
@@ -871,7 +871,7 @@ Then, run `carthage update` to build the framework and drag the built `PinLayout
871871

872872
Once you have your Swift package set up, you only need to add PinLayout as a dependency of your `Package.swift`.
873873

874-
```ogdl
874+
```swift
875875
dependencies: [
876876
.Package(url: "https://github.com/mirego/PinLayout.git", majorVersion: 1)
877877
]
@@ -914,7 +914,7 @@ This app is available in the `Example` folder. Note that you must do a `pod inst
914914
* **Q: How to apply percentage from a CGFloat, a Float or a Int value?**
915915
**R:** Many PinLayout's method has a parameter of type `Percent`. You can easily specify this type of parameter simply by adding the `%` operator to your value (eg: `view.pin.left(10%).width(50%)`. It is similar if you have a value of type CGFloat, Float or Int, simply adds the `%` operator:
916916

917-
```
917+
```swift
918918
let percentageValue: CGFloat = 50
919919
view.pin.width(percentageValue%)
920920
```

0 commit comments

Comments
 (0)