Questions tagged [paintcode]

PaintCode is a vector drawing app that generates CoreGraphics code for Objective-C (iOS, macOS), Swift (iOS, macOS) or Xamarin.iOS.

PaintCode is a Mac app that takes as input vector art, and generates code which will draw images. The code can then be used in Mac, iOS, projects.

Features,

  • Standard vector drawing capabilities.
  • Dynamic colors, gradients, variables, symbols and resizing.
  • SVG, PSD, PDF, AI, EPS import.
  • Code generation for CoreGraphics (Swift, Objective-C, Xamarin.iOS).
  • Simple integration of the generated code into projects.
  • Also exports SVG, PNG, PDF, animated GIF.
  • paintcodeapp.com
99 questions
3
votes
2 answers

PaintCode drawing code android is using pixels instead of points/DP

Note: Yes I know there are other ways of doing buttons in Android, but this is just an example to demonstrate my issue (the actuall buttons are far far more complex). So please don't reply in offering other solutions for buttons in Android, I am…
HixField
  • 3,538
  • 1
  • 28
  • 54
3
votes
2 answers

How to draw a Custom Progress Cycle with PaintCode

I am a starter with PaintCode and Know how to draw a Progress bar, but How to draw a image like below.Thks for help with a parameter I can control the number and the Progress
james
  • 643
  • 4
  • 24
2
votes
1 answer

How to implement PaintCode project into SKScene

In my app I'd like to implement a circle made with PaintCode (Stylekit) in SKScene. This is my code: import SpriteKit import GameplayKit class GameScene: SKScene { override init(size: CGSize) { super.init(size: size) …
Pietro P.
  • 185
  • 1
  • 1
  • 7
2
votes
1 answer

Drawing from PaintCode StyleKit to UITabBarItem

I need to use a PaintCode StyleKit in a UITabBarItem. If I was working with a UIButton, I would simply use these lines of code: override func drawRect(rect: CGRect) { MyStyleKit.drawButton(self.frame) } But if I have to work with a UITabBarItem…
Fabio Cenni
  • 841
  • 3
  • 16
  • 30
2
votes
1 answer

Whats the best width and height for PaintCode canvas?

I'm developing an app using Xcode 7, targetted for all iPhone screens. I'm using PaintCode 2 to design the user interface. But I'm confused about the best height and width which will fit all screen sizes without losing any detail while rendering the…
Dr.Ax
  • 281
  • 5
  • 12
2
votes
2 answers

Dynamically change position based on scrollView

I have a "U" shaped UIBezierPath which I use as the path for my myImage.layer to animate on. I also have a scrollView. My goal is to have a custom "Pull to Refresh" animation. The problem I am having is that I want my myImage.layer to update based…
JEL
  • 1,540
  • 4
  • 23
  • 51
2
votes
2 answers

How to force SKTextureAtlas created from a dictionary to not modify textures size?

In my project, textures are procedurally generated from method provided by PaintCode (paint-code). I then create a SKTextureAtlas from a dictionary filed with UIImage generated by these methods : myAtlas = SKTextureAtlas(dictionary: myTextures) At…
Dominique Vial
  • 3,729
  • 2
  • 25
  • 45
2
votes
1 answer

PaintCode 2 with UIButtons in Storyboard

I export a StyleKit.h file from PaintCode 2. It has a class method: + (UIImage*)myImage; In my storyboard, I have a UIButton, and I want to set the image for UIControlStateNormal to myImage. In order to do this, I have added a generic Object to…
Josh Gafni
  • 2,831
  • 2
  • 19
  • 32
2
votes
3 answers

Converting a CGGradient to a CAGradientLayer

I'm using a PaintCode StyleKit to generate a bunch of gradients, but PaintCode exports them as a CGGradient. I wanted to add these gradients a layer. Is it possible to convert a CGGradient to a CAGradientLayer?
mlevi
  • 1,433
  • 3
  • 18
  • 30
2
votes
2 answers

Best way to wire up a PaintCode button?

I have created a custom button in PaintCode. PC has lots of documentation on creating graphics, but not using them. My method works but it has problems which I'll get to... I went the route of subclassing a UIButton which I placed in my storyboard.…
inorganik
  • 24,255
  • 17
  • 90
  • 114
2
votes
1 answer

PaintCode file to SKShapeNode

I could use a few pointers with turning PaintCode files into SKShapeNodes for use in an app I am building. There are two specific issues I am trying to overcome, as outlined below. I am using Xcode 6 beta 4, SpriteKit, Swift and PaintCode for the…
zeeple
  • 5,509
  • 12
  • 43
  • 71
1
vote
1 answer

Translate generated code shape by PaintCode to dynamic shape size

I am try draw shape using UIBezietPath but each time I am have trouble with "Curve". For solving my problem I did use Paint Code, code was be generated well, but it is a static shape , and I try translate this code for dynamic screen size, but each…
Ice
  • 680
  • 1
  • 10
  • 23
1
vote
2 answers

Force Custom NSView from PaintCode to Redraw

I created an icon in PaintCode that is drawn programmatically (but this question isn't necessarily specific to that tool) and I'm trying to get that icon to redraw. I use a custom class like this: class IconTabGeneral: NSView { override func…
Clifton Labrum
  • 13,053
  • 9
  • 65
  • 128
1
vote
1 answer

Why is the hitTest / tap detection within a bezier path producing inaccurate results in the following scenario?

I need to detect taps within a very specific area of my UI - a piano key that's at an angle, highlighted in blue here, but the way I have it currently set up, the detection is inaccurate: Since this isn't a simple rectangle, I can't just use a…
Matvey
  • 335
  • 4
  • 18
1
vote
1 answer

PaintCode expression for dynamic stroke width based on frame

I've got a bezier with a stroke which is contained within a frame. My bezier resizes dynamically along with the frame very nicely, but the stroke width is static which makes it look bad at small sizes. (Notice how the stroke isn't proportional on…
Kenny Wyland
  • 20,844
  • 26
  • 117
  • 229