Better Programming

Advice for programmers.

Follow publication

Member-only story

Adding More Controls to Your SwiftUI Painting App

Continuing on our journey to build an iOS paint app

Mark Lucking
Better Programming
Published in
4 min readOct 21, 2021
Photo by Tamanna Rumee on Unsplash

You have I trust read part one and two of this short series in which I hope to develop a simple painting app. If you haven’t then you should stop here and read them first:

  1. Build a Painting App in iOS 15 With SwiftUI
  2. Adding Shapes and Colors to Your SwiftUI Painting App

Bon — thanks for coming back — join me to continue working on a painting app under iOS 15. Here is an update on where I am.

The Brief

I want to make a subtle change to how the angle/sides methods work, as well as additional methods to manage deletions of objects and changes in their z layer, higher or lower, on top, in the back. I plan as well to try to reorganize the code a little, removing code from ContentView that should be in its own file.

To Code

Let me start with moving the methods deselect and searchin, the former appears twice. I move them both into a file called Shapes.swift and remove them from the ContentView.swift.

Next, I make the first try at writing the methods needed to move shapes to different levels, report how many shapes I have, and delete shapes, controls that I will add…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Mark Lucking
Mark Lucking

Written by Mark Lucking

Coding for 35+ years, enjoying using and learning Swift/iOS development. Writer @ Better Programming, @The StartUp, @Mac O’Clock, Level Up Coding & More

No responses yet

Write a response