5 ms·
PaintCode - Vector Based Obj-C Graphics Code Generator
- frankus 15y agoI'm interested in pretty much the exact opposite of this product. I've worked on a few apps where I need to pre-render some high-quality images and include them in the app bundle. In some cases they are relatively difficult to hand-draw in an image editor (at least the sort of image editors I can afford) and I've had to write a Mac app to draw the image. Basically the sort of thing that a CAD program would be good at. So I'd love to have something that I can script in a relatively high-level language that renders really sharp antialiased graphics at 2x resolution with control over things like end caps.
- illicium 15y agoHardcoding... graphics? Why?
- J3L2404 15y agoResolution independence.
- DHowett 15y agoIf you boil down a UI element's description to a set of lines, colours and gradients, you can easily apply that to other elements at all scale factors, without having to ship piles of images (possibly in four different sizes, if you have iPad-specific assets) and deal with the horrible "stretchable images" system. That aside, the ease of prototyping makes development that much faster.
- ryanpetrich 15y agoStretchable images are quite elegant: they are relatively easy to use, use less memory and memory bandwidth, perform all drawing on the GPU when paired with UIImageView, animate size changes effortlessly and automatically share their buffer between all image views that use a single resource. You can certainly add all of this to elements that are drawn "in code", but it's considerably more work.
- gte910h 15y agoPeople are currently using PNGs So you're hardcoding either way. Additionally, paintcode has the flexibility of making say, a button that shrinks/grows based on the shape of another view, say, as is caused when you rotate an ipad, etc. I've been very happy with the product so far.
- shock-value 15y agoThis product just outputs Obj-C, which must be baked into your source code, right? That's what I think of as hardcoding. I wouldn't call loaded PNG's from outside of the binary "hardcoded". I can certainly see where having easy programmatic access to the primitives that make up a vector drawing would be useful though.
- gte910h 15y agoIt outputs code that you can customize dynamically though...unlike pngs
- tptacek 15y agoI'm waiting for someone to tell me what's horribly wrong with this before I click the "Buy" button, but it's taking effort to resist the urge. This looks extremely excellent.
- J3L2404 15y agoThere is a trial version so try away.
- tptacek 15y agoThe money is irrelevant. $70 is chump change for any application I care about enough to do custom drawing in. But if there's something unworkable about the approach, I sure wouldn't want to waste my time. (I have a couple Mac Cocoa apps I'm working on that I kinda sidelined because UI controls were painful).
- J3L2404 15y agoI see. Well $70 isn't irrelevant for everyone so I am glad they have the free trial. Good luck on your apps!
- DHowett 15y agoThe only real downsides I can find are that: 1) You need to design the selected/deselected states for buttons separately and merge the code. 2) It'll give you drawing code, but you have to maintain those chunks of code directly in your source files. Any modifications you make to the code need to be reflected in the original PaintCode data, and vice-versa. This could be solved with clever comment guards and the ability to rebuild internal structure from the code it generated. Neither of these really detract from the product. I've only used the demo, but it's honestly pretty amazing.
- thought_alarm 15y agoCore Graphics drawing is actually quite slow. On the Retina iPad, drawing is 4 times as slow and uses 4 times as much memory as the 1st gen iPad, and all the CPU cores in the world are not going to help you. Having recently ripped out most of my -drawRect: methods, replacing them with custom rendered UIImages, I can attest to the significant performance gains that UIImage gives you. On the Retina iPad, I think it's pretty much mandatory. With that in mind, I think most people are better off using a tool like this to produce PDF data rather than raw CG calls, and use generic code to render that PDF data to a UIImage. PDF data produced by Quartz is going to render exactly the same as raw CG calls. It makes for easier project management, and much better performance. Of course, if you don't need resolution independent graphics, just use png.
- 0x09 15y agoPrevious discussion: http://news.ycombinator.com/item?id=3707421 http://news.ycombinator.com/item?id=3707421
- evincarofautumn 15y agoIANAL, but does this violate the part of Apple’s iPhone Developer License Agreement that says “applications must be originally written in Objective-C, C, C++, or JavaScript”? The code is “written” in Objective-C, but it was “originally” not code at all.
- samnm 15y agoI don't think that's part of the developer license agreement any more. Considering how successful Unity, Corona and other non-obj-c development tools have been I'd be surprised if it was.
- evincarofautumn 15y agoDon’t know. The last I heard of it was mid-2010, and there doesn’t seem to be new information saying it’s changed. Apple seems bent on killing Flash, and that wording was a perfect way to deal with CS5. Unity, on the other hand, has a good relationship with Apple, so there’s no reason for Apple to invoke Dread Section 3.3.1 against them.
- gte910h 15y agoThat is not part of the license anymore.
- evincarofautumn 15y agoThanks for clearing that up. I just didn’t know and couldn’t readily find it.
- acidblue 15y agoSeriously? That's like saying if you thought of the code, wrote it down on paper or started off as UML diagram that it would be invalid. I hope you were kidding.
- kinship 15y agoFunny how many products are required to develop decent apps for iOS! Just kidding: this app is not needed.