PaintCode 工具讓設計師可以選擇匯入多種檔案格式 PDF、SVG、PSD、AI 和 EPS 檔,快速將設計檔轉換為程式碼,可以選擇轉換成 Swift、Objective-C、Java、C#、JavaScript 或 SVG 程式碼, 並且快速將程式碼直接應用在 iOS、MacOS、Android 和 Web 上,特別適合需處理介面設計的設計師和開發者。
Why should you use PaintCode?
Resolution independence
Avoid the @1x, @2x and @3x image resolution hell. Draw your user interface with resolution independent code generated by PaintCode.
Parametric Drawings
Use variables and expressions to control the color, position, rotation, visibility and other attributes of your shapes.
Faster Workflow
All your PaintCode drawings are exported into a single code file called StyleKit. Re-export StyleKit at any time and see all the updated drawings right in your app.
更新介紹
Android
Finally, the droid you have been looking for!
Use PaintCode to turn your drawings into easy-to-use Android Java code. Perfect for drawing icons and custom UI elements.
You can even make your drawings animated or parametric.
Swift 5.0
PaintCode 3 added support for Swift 3, 4, and 5, fully compatible with Xcode 10, iOS 12, and macOS Mojave.
By carefully analyzing the Swift compiler and tailoring the generated code to it, we were able to improve the compilation speed by more than 150x in many common cases.
JavaScript
With PaintCode 3, you can now export JavaScript code that can be used to draw into <canvas> elements. Perfect for creating dynamic, interactive drawings such as the one on the left.
Resizing Drawing Methods
All generated drawing methods now take 2 parameters - the target rectangle into which you wish to draw and the resizing behavior.
You can choose between ‘aspect fit’, ‘center’, ‘aspect fill’ and ‘stretch’ resizing behaviors.
To turn this feature on for your existing canvases, choose the "Resizing: Using Method Parameters" option from canvas attributes in the inspector.
Telekinesis
Imagine you could redesign your app in real time, while the app is actually running on a real device.
With PaintCode and Telekinesis, you can. Changes you make to your app's design in PaintCode are propagated in real time into your running app. Works like magic. See the video.
Better Preview Window
Press Command+P to show the Preview window. When you work on some small detail in your drawing, you can set the Preview window to show you the big picture.
QuickLook
With our new QuickLook plugin, you can quickly peek into your PaintCode documents without launching the app. You can even preview multiple canvases from your document.
Opacity and Blend Mode for All Shapes
Use the Inspector set the opacity and blend mode for every shape.
Improved SVG Import & Export
Some drawing apps produce SVG documents that make heavy use of CSS. Importing these documents now works much better. We've also improved blend mode compatibility, both for imported and exported SVG documents.
More Improvements…
New functions for use in Expressions: log(x), log2(x), log10(x), pow(x,y).
Uses SF UI font to render macOS and iOS system fonts.
Uses SF Mono font for generated code and expressions, if installed.
Fonts that are not installed are preserved when opening documents.
Live preview of font selection from popup menu using Shift key.
Ability to quickly convert selection to a Symbol.
Ability to preview canvas as icon in the macOS Dock.
功能
Draw things in PaintCode.
You can also import PDF, SVG, PSD, AI and EPS documents.
Get the Generated code.
Choose Swift, Objective-C, Java, C#, JavaScript or SVG.
Use the code in your app.
Works on iOS, macOS, Android and the web.
系統需求
PaintCode compatible with Mac OS X.
Tabs & StyleKit
In the middle section below the toolbar, you'll find the tab bar. You can use tabs to organize the drawings in your PaintCode document. Each tab may contain multiple drawing canvases.
The first tab (named "StyleKit") is special and provides you with access to your StyleKit catalog - a collection of drawings, colors,
gradients and other design assets that you can easily export as a single Objective-C, Swift or C# class. StyleKits make it really easy to integrate the generated code into your projects.
Library
Library (left side of the window) is a collection of all your colors, gradients, shadows, images and
variables. All these library items can be easily reused across your document. Library items are entities on their own in PaintCode, and when you change a library item, all drawings that use that library item are immediately affected.
Canvases
The central portion of the application window contains the contents of the currently selected tab. Typically, you'll see one or more drawing canvases in this area.
Code View & Middle Toolbar
The middle toolbar lets you change the code generation settings (such as the target programming language and operating system). It also allows you to change canvas display settings like zoom and pixel density (Retina, non-Retina or Infinite).
The Code View below the toolbar contains the generated code. You can hide the Code View by dragging the middle toolbar. This leaves more room for your drawing canvases, and also improves the performance when dealing with complicated documents.
Shapes & Groups Browser
The shapes & groups browser is located at right side of the window, below the toolbar. This is a list of all shapes in the currently selected canvas. You'll find the canvas itself at the root of this list. When you select the canvas, settings will appear in the Inspector below.
Inspector
You'll find Inspector at the right side of the window. Inspector allows you to change attributes of your selection, typically shapes in your canvas.
PaintCode Plugin for Sketch 外掛程式
Convert your Sketch drawings into Swift or Objective-C
PaintCode 此款 Sketch 插件是一個獨立的產品,不需要 PaintCode也可運行。
PaintCode plugin for Sketch generates a single class we call "StyleKit". All drawings that you choose to export to code are available as methods in this class.
In your code, you should only use the public interface of this class. This allows you to repeatedly tweak your drawings in Sketch and re-export them at any time. A new StyleKit class will be generated and exported. Because you only use the public API of the class, you won't have to make any manual changes to the generated code to integrate it (or re-integrate it) into your project.
Generated Methods
For each drawing you choose to export (be it page, artboard or slice), two methods will be generated. The first method is a simple void drawing method:
影片介紹
如何使用PaintCode插件?
Sketch的PaintCode插件使您可以非常輕鬆地將繪圖導出到Swift或Objective-C中。
如何使用生成的代碼?
將生成的代碼集成到Xcode項目中非常簡單明了。
為什麼使用代碼而不是圖像?
通過使用代碼,您可以使您的應用程序真正獨立於分辨率。不再有1x,2x和3x圖像。