TOKYO (Tom Bluewater) – For the past three months, I’ve worked on several iOS apps for iPhone and iPad. Speaking of specific apps including Animal Me and Masked Man Or Woman, I had to create a lot of UIBezierPath path objects a few weeks ago. Fortunately, I have a great desktop application (, which I didn’t develop myself) that lets me draw paths with my trackball. Unfortunately, it only generates Objective-C code. And I’ve asked the developer by e-mail whether he or she is going to release a Swift-compatible version. But there’s been no reply. I only write Swift now, so what can I do about Objective-C code that I’ve got? Well, as I usually do, I’ve developed a desktop application to make iOS development more efficient. And I’ve ended up with a desktop application called Path4Code.
Path4Code is a desktop application that lets you quickly convert hundreds of lines of Objective-C code for UIBezierPath into the Swift-compatible. Basically, all you have to do is to plug your Objective-C code into the top text field. And retrieve Swift-compatible code at the bottom or click on the copy code toolbar button.
- The application converts lines of Objective-C code for UIBezierPath into the Swift-compatible with three different modes. Select Absolute to leave point coordinates as they are. Select Relative to divide each coordinate value with the width or height of an area you define. Select Multiple when you work with resizable path objects.
- Choose to omit or not to omit anything (like UIColor, setFill, setStroke, lineWidth) other than lines of code referring to UIBezierPath per se.
- The fullScreen mode is supported.
- The application supports the retina screen. (tested with 2014 2.6 GHz 13″ MacBook Pro)
- Languages: English only.
- Application file size: 27.7 MB.
- The application comes with a built-in 11-page user guide. Choose Show Quick Tour under Path4Code whenever you need to see it.
- 10.11 (tested with 10.11.6), 10.12 (tested with 10.12.2)
- 64-bit system
- A path must be initialized with UIBezierPath’s bezierPath, bezierPathWithOvalInRect, bezierPathWithRect or bezierPathWithRoundedRect methods.
- For now, the application does not support the following UIBezierPath methods: bezierPathWithRoundedRect:byRoundingCorners:cornerRadii:, bezierPathWithArcCenter:radius:startAngle:endAngle:clockwise:, bezierPathByReversingPath. If you have sample code for these methods in Objective-C and Swift, we can probably suppose them, though.
- The application will convert Objective-C code into the Swift-compatible. More precisely, the code you will get is compatible with Swift 3 and not necessarily with Swift 2.2 or 2.3 or any lower than Swift 3.0.
None so far…
Click here to download a trial version. This trial version will remain fully functional for 7 days, starting from the very moment you first launch it.
There is no video tutorial at this time.
Path4Code is a product of Tom Bluewater.
Apple and the Apple logo are trademarks of Apple Inc., registered in the U.S. and other countries. Mac App Store is a service mark of Apple Inc.