[back button] Back to home page

Apance iPad App

I spent three months doing an internship at Apance, where I got to build various features in SwiftUI for their creative iPad app, which is in early access.


Layer Editing

The most complicated feature I worked on was a layer editing frame with drag handles that were used to move, resize, and rotate layers. This was built in SwiftUI and designed to talk with UIKit and Metal to update the layer contents. One challenge was figuring out how a layer and the canvas could both be transformed independently while remaining synced. My solution included converting trigonometric equations into code so the angle and scale of the canvas could offset the position of the layer.

Import / Export

I implemented a menu to be able to export a PNG or JPG of the project or import a photo from the user’s camera roll or the Files app (including iCloud Drive) to add as a layer to the project. This required converting a UIKit share sheet into a SwiftUI view and sending it an image of the canvas generated from the Metal engine.

Comments

I worked on a commenting interface where the user can drag to highlight an area of focus, then type to enter a comment. Other users can see this as a bubble on the canvas while comments are toggled. Getting these bubbles to remain in the correct position even as the canvas is moved around, rotated and zoomed in/out was a challenge. I solved it by using a stored location of the comment relative to the canvas, then reusing some of the code for the Layer Editing feature to convert the canvas location/scale/rotation to the correct position of the comment bubble. I also used SwiftUI’s animation functionality to make adding these comments fluid.

Brush Menu / Color Picker

I also worked on some smaller features like a menu of brushes with settings that can be adjusted by custom sliders; and a color picker that allows the user to drag on the screen to select a color on the canvas by sending information about it’s position to the Metal engine and storing the selected color for use when drawing.

View App Website