雪花:斯威夫特中的SVG
雪花
描述
- 斯威夫特中的 SVG
- 使用驯鹿的 XML 解析器
用法
公文
- 使用 SVG 创建一个
Document
Data
- 流程是
SVG element
->Shape
->UIBezierPath
->CALayer
- 从属性生成
Shape
Shapes
-
The object maps to SVG elements
Shape
- path:
Path
- circle:
Circle
- line:
Line
- polygon:
Polygon
- polyline:
Polyline
- rect:
Rectangle
- ellipse:
Ellipse
- text:
Text
- image:
Image
- path:
-
Path
handles list of commands through objectCommand
Style
- The object encapsulates style information
Style
- Inner style
- Style attribute
Animation
- The cool thing about is that most of its properties are animatable
CALayer
Scale
- Scale layers to a given size
- Scale view to a given size
Text
- TBD
Image
- Support base64 Data URI
Pattern
- TBD
Installation
Snowflake is available through CocoaPods. To install
it, simply add the following line to your Podfile:
or
Snowflake is also available through Carthage.
To install just write into your Cartfile:
Snowflake can also be installed manually. Just download and drop folders in your project.Sources
Author
Khoa Pham, onmyway133@gmail.com
Contributing
We would love you to contribute to Snowflake, check the CONTRIBUTING file for more info.
License
Snowflake is available under the MIT license. See the LICENSE file for more info.