-
Create a project using wizards such as single View Wizard
-
Import TOUCHVG in the Podfile file:
Platform:ios, ' 6.0 ' pod ' TOUCHVG '
Then run the pod install download TOUCHVG code. Subsequent runs speed pod update --no-repo-update up the download without checking the latest version every time.
Then open *.xcworkspace into Xcode.
-
will be ViewController.m changed to ViewController.mm . TOUCHVG is implemented in C + +, at least one file in the program engineering is a. mm suffix, or a link error occurs.
-
Open the Main.storyboard, drag a new view to the main page, set the class for this new one, GiPaintViewXIB add the string property with the value, as shown in the image on the splines command left. This property automatically launches the Scribble Curve command, after which the hand-drawn effect is displayed as shown in the image on the right.
You can set more properties to get the following freehand effect. Attributes allow you to specify drawing effects at the interface design stage without having to write the appropriate drawing code. The available drawing properties are shown in GiPaintViewXIB.h.
Sample code See GitHub or OSC, Welcome to Fork.
iOS Drawing Example 1: Using Storyboard