Questions tagged [paint-code]

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

1
vote
1answer
48 views

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 ...
0
votes
1answer
21 views

Add highlight effect to the UIButton that created by PaintCode code

I have made a button by using PaintCodes code: class AddIconView: OUIButton { override func draw(_ rect: CGRect) { AddIcon.draw(frame: rect) } } Then I add its class to a UIButton. ...
0
votes
1answer
60 views

Add custom class to UIView in the UITableView

I have made some icon with the paint code app: class addIconView: UIView { override func draw(_ rect: CGRect) { TodayIcon.draw(frame: rect) } } I also add the configuration of the ...
-2
votes
1answer
30 views

Resizing image generated by PaintCode app

I have imported a vector image to PaintCode app and then export its Swift to code. I want to use this vector image in a small View (30x30) but since I want it to work on different devices, I need it ...
0
votes
2answers
62 views

Make clockwise disappearing circle with PaintCode

I'm trying to make a clockwise disappearing circle on top of my logo with Paintcode. So far I made variables for start and end angles and I don't know how to make the step by step process for ...
1
vote
1answer
31 views

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....
0
votes
1answer
150 views

UIButton title + image using Paintcode app

I have a UIButton with title and image onto the right of the title. But i wanna draw the image using paintcode app rather than using image in assets. How can i do it?
-3
votes
1answer
51 views

Integrate PaintcodeApp swift code into Xcode

I have an svg image from the designer. I want to get equivalent swift code from Paintcode app so that it fits perfectly inside a circular button . How do i set the frame? Suppose i have two circular ...
0
votes
1answer
108 views

Unable to draw in UIview - PaintCode

I've created a Paintcode project of a Line graph, and tried to implemented in my Xcode project. But unfortunately the UIView does not draw anything. Here is my StyleKit File: import UIKit public ...
2
votes
1answer
59 views

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) { ...
0
votes
1answer
30 views

Paintcode export to subfolder

When defining export to image settings for a canvas, is there a way to let PaintCode export to different folders depending on the canvas? A few of my canvasses are language dependend and need to be ...
1
vote
2answers
484 views

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 ...
0
votes
2answers
207 views

Add gesture recognizer to BezierPath created by PaintCode

I have no idea about the following situation: I had exported a NSObject from PaintCode and made a .swift file (someObject.swift). public class PlanATrip: NSObject { class func drawRectangle1(...
2
votes
2answers
679 views

How to use color variable with PaintCode & Xcode

I have an Icon drawn via PaintCode. I need to change his color in XCode, programmatically. On PaintCode, I set a Variable "ChevronColor" to the Stroke Color. For now I have: @IBDesignable class ...
0
votes
0answers
45 views

PaintCode button press in view using objective-c?

So I used PaintCode to make a popup view. I used two canvases for it, the main one for the popup and another for a x close button. I want to be able to detect when that x is tapped so I can close the ...
0
votes
1answer
22 views

How to load an image from a function in another class in UICollectionView? I'm using paint code

I have a collection view which will have to load the content of the cells but I don't want to use images from assets. So, I create a class with Paint Code which draws some images for me. However, I ...
1
vote
1answer
131 views

How to access a layer inside UIView custom class generate with Paintcode?

I'm using Paintcode V3 and last Xcode for my project. In Paintcode I draw a red path, kind of "clock hand" with a radius variable to be able to rotate it. In my Xcode project, this custom UIView is ...
0
votes
1answer
110 views

Paintcode and Snap SVG

I am trying to bridge examples from Paintcode and Snap SVG. Here is a simple project that has the gears that spin when a slider is dragged. This is great but I would like to do the interaction with ...
1
vote
0answers
159 views

Import .Sketch into Java program

I have a .sketch file that I have been using for design work. I know that there is paintcode for converting that into objective-c etc. however for my assignment I need to write it in java. Hence is ...
1
vote
1answer
244 views

Views drawn from code (PaintCode) are pixelated, very pixelated when scaled

I am building an app that overlays views drawn with code (output from PaintCode) onto photos. I have added gesture recognizers to rotate and scale the views drawn with code. There is some mild ...
1
vote
0answers
246 views

How to get PaintCode generated code for a view working in Xcode?

I am having trouble at the moment fully understanding how to use PaintCode for the first time. I created my UI in PaintCode and converted it into Objective C code using StyleKit. So it generated a ...
0
votes
1answer
138 views

Xamarin.Forms PCL/SAP Custom renders with paintcode 3 support

Guys! I have a really good question I'm working with Paintcode 3 and im working in Xamarin.Forms(PCL/SAP) Project. I have a sample project running right now and i have a custom drawing in paintcode 3. ...
1
vote
1answer
79 views

PaintCode 2 vs 3 incompatible due to resizableImageWithCapInsets

I recently switched from using PaintCode 2 to PaintCode 3, I am using it together with xCode/Swift. I noticed however, that all my image generating functions not behave differently. They seam to ...
0
votes
0answers
111 views

Multiple buttons in Paintcode swift 3

is it possible to have a group of buttons in the same view that does different things when tapping, will frames do the job? or do i have to have different UIVIEWS for each button seperately? thanks!
3
votes
2answers
357 views

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
0
votes
2answers
219 views

Swift 3- PaintCode StyleKit Color Error

Before upgrading to Swift 3 and Xcode 8, my StyleKit project worked beautifully. Here is my code for some of the colours: //// Color Declarations let purplebliss1 = UIColor(red: 0.212, green: ...
1
vote
1answer
550 views

Sketch+PaintCode vs Storyboard

Sketch is a UX and UI design tool. PaintCode has a code generating plugin for Sketch that can generate CoreGraphic code for all designs. For iOS designs that are mostly using the standard design ...
1
vote
1answer
84 views

Invalid redeclaration of “StyleKitSettableImage” in Paintcode

I have two Paintcode Stylekit swift classes to write two different images into two different views. The first one works well, but when I import the second one these two function @objc protocol ...
1
vote
1answer
230 views

Xcode resize vector shape generated with paintcode

I created a vector shape with Paintcode an the I need to draw the image into a BarButtonItem; i know that i have to use myBarButtonItem.image = StyleKit.imageOfCanvas1(CGRectMake(0, 0, 30, 30)), but ...
0
votes
2answers
140 views

Icon assets vs. icon code [duplicate]

I am working on an app which has lot of images and graphics. There are instances where I need to re-use the icons, images etc to change color using the image rendering capability of Xcode. Inspite all ...
2
votes
1answer
257 views

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....
6
votes
3answers
19k views

Warning: Could not load any Objective-C class information using PaintCode's code

I am trying to draw svg maps using code generated through paintcode. The code is working fine when I am running it using simulator. But If I run it in device (iPad), it is crashing in drawCanvas ...
1
vote
2answers
488 views

UIButton in PaintCode (Swift)

So i've been playing around with PaintCode and StyleKits in Xcode. I made a button, created a UIView with it's own subclass, and it shows up fine in my ViewController and on my device. However, I want ...
2
votes
1answer
249 views

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 ...
1
vote
1answer
268 views

Moving Tail Animation

I want to make an animation with a moving line, similar to a dog waging his tail. I'm not sure how to begin. I've used Core Animation's CAShapeLayer for progress bars before but don't know if it ...
1
vote
2answers
490 views

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 ...
1
vote
1answer
287 views

Dynamic UIBezierPath for Animations

I want to create an animation where an object animates its position along a path. The trouble I am having is making this path dynamic meaning that it works on all screen sizes. The spaceship in the ...
0
votes
0answers
76 views

Spritekit Animate Textures, or Nodes for performance?

Just wondering if anyone knows which has better performance, when the result is pretty much the same? For example, the situation I am working on is animating a character's face. I have two ways of ...
1
vote
2answers
488 views

'blendedColorWithFraction:ofColor:' in iOS Swift and ObjC

I've got a simple gradient: 2 colors, 1 location. But it's spitting out code that can't work on UIColors: let gradient = CGGradientCreateWithColors(CGColorSpaceCreateDeviceRGB(), [gradientColor2....
1
vote
2answers
143 views

paintcode and “use of string literal for Objective-C selectors is deprecated; use '#selector' instead”

Since the update to xCode 7.3 and swift 2.2 code generated by PaintCode now produces the following warnings: Use of string literal for Objective-C selectors is deprecated; use '#selector' instead ...
0
votes
1answer
68 views

adding an image to a UIView 's drawing without letting the image spread [duplicate]

i have a UIView in which i am drawing a shirt using Paint Code. i have to apply an png image which will be the pattern of the shirt. The pattern when added spreads outside of the shirt. How to make ...
1
vote
1answer
172 views

PaintCode NSButton displays upside-down

I am using PaintCode to create a button. I import the StyleKit, and create the NSButton Class for my RankView button. Like this: import Cocoa @IBDesignable class RankView: NSButton { override ...
1
vote
1answer
440 views

Inserting PaintCode code into UIImageView in Swift

I am experimenting with PaintCode. As an example, I've imported an abstract Illustrator drawing file, which has produced the below bezier Swift code. On my storyboard I have an UIImageView named ...
11
votes
1answer
1k views

iOS - which is the better option to put images? Core Graphics(PaintCode App) vs Image files(png)

I am developing an iOS app which uses quite a few images. I am kind of confused about how to load the images in the app. A similar question was asked around 5 years ago. But a lot has changed since ...
1
vote
2answers
2k views

Applying animation on a circular chart

I have built a circular graph very similar to this example in paintcode: http://www.paintcodeapp.com/news/animating-apple-watch-activity-rings-in-paintcode I have successfully drawn out the control ...
0
votes
1answer
170 views

Variable to control bezier points in a line for graph in PaintCode

I have just started to use PaintCode some days ago and did all the tutorials but I am banging my head against a very simple task. I have created a temperature plot with a Bezier and I want to assign a ...
1
vote
1answer
365 views

PaintCode animation in Xcode

I am trying to understand how PaintCode animations can be intergated in Xcode. In my example I have a ball going from right to left. I want the animation to start as long as the app starts and stop ...
1
vote
1answer
243 views

How do i fill part of a shape's color in PaintCode?

So i have this vector in for a rating system in PaintCode I would like to be able to fill the colors partially. Like this: Can this be accomplished in PaintCode?
1
vote
1answer
105 views

When I zoom, I want to supply a new image to the image view from PaintCode at the correct zoom level

I have an image drawn using PaintCode. And that image has a Scale variable. on line marked "// A", I've edited the usual PaintCode generated code so that I can pass in a scale and have the image ...
0
votes
3answers
785 views

Adding images with PaintCode into Xcode 7 using Swift 2.0

I am trying to move a swift file that I exported from PaintCode 2 into my project. I did the following. Exported the project via PaintCode Moved the file into Xcode On my storyboard I put a UIView ...

http://mssss.yulina-kosm.ru