TouchVG is an open-source vector graphics engine for iOS based on iOS Core Graphics API. It provides a handy way to display and manipulate vector graphics in your iOS app. Whether you are building a CAD, diagramming, or drawing app, TouchVG can simplify your development process and make your app shine.
Features
- Powerful vector graphics engine for iOS
- Built on top of iOS Core Graphics API
- Supports displaying and manipulating vector graphics
- Provides a variety of tools for CAD, diagramming, or drawing apps
- Optimized for performance and smooth rendering
- Extensible and customizable
Installation
Follow these steps to install TouchVG in your iOS app:
- Open your project in Xcode
- Navigate to your project’s target
- Go to the “General” tab
- Scroll down to the “Embedded Binaries” section
- Click the “+” button
- Click “Add Other…”
- Navigate to the location where you downloaded TouchVG
- Select the “TouchVG.framework” file
- Click “Open”
- Ensure the framework is added to both “Embedded Binaries” and “Linked Frameworks and Libraries” sections
- Build and run your app
Usage
To use TouchVG in your app, follow these steps:
- Import the TouchVG framework
- Create an instance of the
VGView
class, which is a subclass ofUIView
- Add the
vgView
to your view hierarchy - Start using TouchVG methods to display and manipulate vector graphics in your app
// Swift
import TouchVG
// Objective-C
@import TouchVG;
// Swift
let vgView = VGView(frame: CGRect(x: 0, y: 0, width: 320, height: 480))
// Objective-C
VGView *vgView = [[VGView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
// Swift
view.addSubview(vgView)
// Objective-C
[view addSubview:vgView];
Documentation
For detailed documentation and usage examples, please refer to the official TouchVG GitHub repository.
License
TouchVG is released under the MIT License.