Skip to content

Step by step to create a vector drawing application with TouchVG.

Notifications You must be signed in to change notification settings

ljlin/iOSHelloWorld

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iOSHelloWorld

In this tutorial, you will create a vector drawing app based on TouchVG. See touchvg/Readme.txt to copy files required to compile.

  • Create a project with the Single View Application wizard.

  • Add the libraries and header files of TouchVG to this project.

    • `cd' to the 'ios' directory of the TouchVG project.
    • Type ./build.sh to compile libraries outputed to the 'ios/output' directory.
    • Add TouchVG, TouchVGCore, libTouchVG.a and libTouchVGCore.a to this project.
    • Change 'Library Search Paths' of the HelloWorld target from '.../iOSHelloWorld/touchvg' to the relative path 'touchvg'.
  • Add QuartzCore.framework and libc++.dylib in 'Link Binary With Libraries' of the target.

    • Add libc++.dylib for ViewController.m or change ViewController.m to ViewController.mm to use Obj-C++ classes of TouchVG.
  • Add a vector drawing view in ViewController.mm/.m:

    • Add #import "GiViewHelper.h" to use helper = [GiViewHelper sharedInstance].
    • Add a drawing view in self.view via [helper createGraphView:self.view.bounds :self.view];.
    • Start the free-hand splines command via helper.command = @"splines";. The names of all commands will be printed in logging after the app runs.
  • Enjoy the simple drawing app now! You can fork this project and add drawing UI reference to ColorPad wizard.

About

Step by step to create a vector drawing application with TouchVG.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 89.7%
  • Objective-C 5.7%
  • C 2.8%
  • Objective-C++ 1.8%