Skip to content

Commit

Permalink
Update readme with svg
Browse files Browse the repository at this point in the history
  • Loading branch information
timrwood committed Jan 27, 2015
1 parent 8632411 commit 662037e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 9 deletions.
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,26 @@

A Swift Library for parsing SVG path strings into UIBezierPaths

# Installation

## CocoaPods

```ruby
pod 'SVGPath'
```

# Example

```swift
let svgPath = "M85.384 32.884C115.46 68.38 239.47 170.94 281.4 " +
"192.53 311.84 126.2 274.938 43.767 244.68 0c97.903 58.96 146.498 " +
"167.557 121.765 254.406 28.978 28.984 40.134 89.26 29.742 108.594 " +
"-25.357-45.46-67.378-39.82-93.413-24.977C176.784 409.845 24.18 " +
"296.47 0 233.15c68.297 56.465 170.137 65.246 226.388 27.535C165.59 " +
"217.78 56.806 89.835 36.638 54.818c42.772 38.274 116.565 96.602 " +
"161.76 122.154C159.906 137.854 108.122 72.34 85.384 32.884z"

let path = UIBezierPath(svgPath: svgPath)
let path = UIBezierPath(svgPath: "M85 32C115 68 239 170 281 192 311 126 274 43 244 0c97 58 146 167 121 254 28 28 40 89 29 108 -25-45-67-39-93-24C176 409 24 296 0 233c68 56 170 65 226 27C165 217 56 89 36 54c42 38 116 96 161 122C159 137 108 72 85 32z")
```

[![Swift Logo Example][example-url]]

[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: LICENSE

[travis-url]: http://travis-ci.org/timrwood/SVGPath
[travis-image]: http://img.shields.io/travis/timrwood/SVGPath/develop.svg?style=flat

[example-url]: example.svg
23 changes: 23 additions & 0 deletions example.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 662037e

Please sign in to comment.