30 Days to App, Week 4

Or, deep in the valley of frustration

Me vs Swift this week | via @darkstockphotos

After completing a number of helpful tutorials and demo apps over the past few weeks, this week I officially started coding my first note-taking app.

This GIF illustrates my experience and feelings since then…

Moving from following tutorials to coding on my own

In other words, I’m experiencing a lot of frustration translating my concept into a working app.

I compare the feeling to trying to learn a new language. When you think you have a good handle on the basics, you talk to a native speaker — it can be extremely overwhelming when you realize how far you are from fluency. That’s where I’m at with Swift. Granted, I’ve only been at it for a few weeks, but it’s still frustrating.

Let’s start with the positive — what hasn’t been a challenge? Basic functionality. When the app launches, you’re quickly presented with your note and the keyboard is active. You can share the contents of your note (via the system share sheet). I customized the UI colors. All easy peasy.

From there, things quickly turn for the worse.

The biggest stumbling block has been the dynamic placement of the UIToolbar. In iOS, this is a standard UI element found at the top or bottom of your screen that contains UI buttons like the ‘Done’, the Share icon, etc. The toolbar itself is easy enough to implement, but I would like it to move with the keyboard so it’s always visible.

A typical UIToolbar

When the keyboard is active, it should appear above the keyboard, then move to the bottom of the screen and remain visible when the keyboard is dismissed. I’ve seen this implemented in other apps, but I haven’t found straight-forward explanations for how it’s done.

Other challenges include:

  • Saving data between sessions. This should be easy to solve, but my app isn’t using a UITable, so I need to figure out have to save the contents of the UITextView without using a table (assuming that’s possible). Solvable with time.
  • Creating custom functionality for UIButtons. Again, this shouldn’t be a huge challenge, I just don’t know the Swift language well enough to implement without spending time researching solutions.
  • Fine-tuning the typography. I think good typography is critical for a notes app. So far, the adjustments I’ve made (like adjusting line spacing) have introduced other issues (like overriding the standard font size), so I’ve moved this down in the priority list for now.
  • Other, more complex features that I’d hoped to implement — swipe to clear/share, advanced text formatting and font size adjustment — definitely won’t be doable in my arbitrary 30-day schedule, so I’m shelving them for now.

Asking better questions

Despite my frustrations, the bits I’ve learned so far have helped me in a big way — I can ask much better questions and better parse and understand how the range of answers might solve my problems.

I’ve watched (or rewatched) tutorial videos (specifically, on Lynda.com and YouTube). But now, I can be a lot more selective with which sections of the videos I watch, which saves quite a bit of time.

StackOverflow has also been a big help, although Google searches with ‘-stackoverflow’ can be just as helpful.

Beyond tutorial videos and Google searches, the best thing I’ve done is simply focusing on solving one problem at a time. When I started running in to challenges and getting overwhelmed by issues, creating a simple checklist and concentrating on checking them off one-by-one helps me feel like I’m making incremental progress and getting closer to my goal.

The final countdown

With a handful of days remaining in my 30-day challenge, I’m not as confident I’m going to hit my goal, but I just need one or two breakthroughs to pull it off, so the work continues…

If you enjoyed reading this post and want to follow along to see if I hit my goal, please recommend and share the post to help others find it.