This is a unit test and example project for vgios, which is a lightweight 2D vector drawing framework for iOS.
This is an open source BSD licensed project. It uses the following open source projects:
- vgios (BSD): Vector drawing framework for iOS.
- vgcore (BSD): Cross-platform vector drawing libraries using C++.
- SVGKit (MIT): Display and interact with SVG Images with CoreAnimation on iOS.
- DemoCmds: A template and example project containing customized shape and command classes.
Type pod install
or pod update --no-repo-update
, then open TestView.xcworkspace
in Xcode and run the TestView
demo app.
The TestView
demo app has two targets:
-
TestView
target usinglibTouchVG.a
does not support SVG display. -
TestView-SVG
target usinglibTouchVG-SVG.a
andSVGKit
can display SVG shapes. -
To run on device, you may need to change the Bundle Identifier of the demo application, such as "com.yourcompany.TestView", and choose your own development certificate (Code Signing).
To use SVGKit, uncomment 4 lines about 'TestView-SVG' target in the Podfile.
Alternatively, you can build as one of the following methods:
-
Cd the folder of this project and type
./build.sh
or./build.sh -arch arm64
to checkout and build libraries needed. -
Open
TestView.xcworkspace
in Xcode, then run theTestView
demo app (Need to build each library while not type./build.sh
).
-
Do not want to write C++ code? Please reference to test/src/vgtest/testview/shape package to write your own shape and command classes.
-
You can create library project containing your own shapes and commands. So the TouchVG and TouchVGCore libraries does not require changes.
-
Checkout and enter DemoCmds directory, then type
python newproj.py YourCmds
:git clone https://github.com/rhcad/DemoCmds.git cd DemoCmds python newproj.py MyCmds
-
-
You can customize the drawing behavior via implement your CmdObserver class (see the example in DemoCmds ).
Contributors and sponsors are welcome. You may translate, commit issues or pull requests on this Github site. To contribute, please follow the branching model outlined here: A successful Git branching model.