forked from software-mansion/react-native-svg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
67e66aa
commit 936a10d
Showing
8 changed files
with
60 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,23 @@ | ||
### react-native-art-svg | ||
### react-native-svg | ||
|
||
------------------------ | ||
|
||
`react-native-art-svg` is built to provide a SVG interface to react native on both iOS and Android which is based on *ART* | ||
`react-native-svg` is built to provide a SVG interface to react native on both iOS and Android | ||
|
||
#### Features | ||
|
||
1. Supports most of SVG elements and properties(Rect, Circle, Line, Polyline, Polygon, G ...). | ||
2. 100% based on ReactNative`s ART library | ||
3. Easy to convert SVG code into ReactNative code. | ||
2. Easy to convert SVG code into ReactNative code. | ||
|
||
![example](./screenShoots/art-svg.gif) | ||
|
||
#### Install | ||
|
||
`npm install react-native-art-svg` | ||
|
||
##### On iOS we should add import `ART` library into your project | ||
|
||
To add ART.xcodeproj find the file located in react-native/Libraries/ART/ART.xcodeproj and just drag it over to the Libraries section in XCode. That should look like so | ||
|
||
![Add ART.xcodeproj to Libraries](./screenShoots/addXcodeproj.png) | ||
|
||
Next we’ll link the binary. | ||
|
||
With the root project selected on the left, select `Build Phases` from the center view. There will be a section called “Link Binary With Libraries”, expand it, press the + and select `libART.a` | ||
|
||
Like so | ||
|
||
![Link binary](./screenShoots/linkBinary.png) | ||
|
||
([Getting react art running on react native](http://browniefed.com/blog/2015/05/03/getting-react-art-running-on-react-native/)) | ||
#### Install | ||
|
||
##### On android | ||
``` | ||
npm install react-native-svg --save | ||
rnpm link react-native-svg | ||
``` | ||
|
||
react-native\`s `ART` for android is shipped within [email protected] | ||
|
||
#### Usage | ||
|
||
|
@@ -57,7 +40,7 @@ import Svg,{ | |
Use, | ||
Defs, | ||
Stop | ||
} from 'react-native-art-svg'; | ||
} from 'react-native-svg'; | ||
class SvgExample extends Component { | ||
render() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters