Last time, we built a bog standard “Hello, World!” MVVM based app in SwiftUI using Combine. In this post, we’re going to query an API for some items, and render them in a grid.
We will use our existing files, as well as make more. So, open up the project we built last time, and let’s get going!
(NB: This series will focus on using SwiftUI components to achieve everything where possible, and I will try to avoid wrapping UIView objects.)
To better separate our concerns, go ahead and…
I think it’s fair to assume that everyone who went through Lockdown ended up rediscovering a long-lost passion or two while spending more time at home. I definitely include myself in this, as the monotony of my work-life routine had been turned on its head, the same as everyone else’s. I no longer woke up to a scantly furnished apartment, prepared myself for work, and hurried for the train while gulping down a molten Starbucks blend coffee. My office had moved from a 20 minute train ride to 20 feet away from my bed for who-knows-how-long.
After an initial adjustment…
In a nutshell, semantics is the branch of linguistics and logic concerned with meaning. Lexical semantics is a subgroup concerned with the analysis of word meanings and relations between them.
I pay very close attention to detail when implementing a design. Simply put, I find UI-work fun. It’s the user-facing part of a product or service, regardless of platform. Thus, I think it’s the most important thing to get right.
I also think it’s great to experiment with UI-implementation methods, as there’s always a chance I’ll find a newer, easier, or better way to do something I’ve been doing a…
Have you ever wanted to get the size of a
UIImage contained within a
UIImageView? It’s quite easy really, just use the following line of code:
let size = imageView.image?.size ?? .zero // optional for brevity
However, if you happen to’ve set a
contentMode such as
.scaleAspectFill on your
UIImageView, the size returned upon calling the getter will not be the view’s bounds — it will be the size of the actual image. This can be anywhere between zero and a few trillion gigapixels in size, or however big the image was, which revealed the M87 Black Hole.
A few years ago, I wrote my first ever custom
UICollectionViewFlowLayout. It made everything bounce like the Messages app does with its chat bubbles on iOS — and still doesn’t on macOS. 🔥
If you’ve never noticed the effect before, open a conversation in Messages on your iPhone or iPad, and scroll around a bit. If you pay attention, you’ll see that the items further away from your finger move slower than the items closer to it. In other words, they have inertia.
This weekend, I was cleaning up disused files on my Mac when I stumbled across this file…
Just this past week, I unearthed some Swift code I wrote almost three years ago. Naturally, it no longer works whatsoever without a considerable refactor. I gave it a once over, and realised how far I'd come in terms of what I could write then, and what I can now.
In what I can only classify as a lapse of sanity, I decided to rewrite and re-publish it.
Sometimes I'll come across an animation in an app that’s really f**king awesome. It’s superfluous, but I love it. I think that this kind of thing adds a touch of humanity, which…
UIRefreshControl is completely adequate. Why?
It does what it says on the tin — it enables the user to control when the app they’re using reloads, and to see when that’s happening.
I’m writing this because I wanted to add branding to my app. You sometimes need to focus on every detail, big and small, to deliver a truly great experience to your user.
When you have branding in an app, the use of bog-standard components can easily jar the user out of whatever experience, you’re trying to create for them.
UIRefreshControl was no exception to this…
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move… just kidding!
It all started quite recently. On Thursday evening, at 6:42pm to be slightly more precise. I had some bandwidth, and so decided to tackle a long-standing thorn in my team’s side — enabling manual deployment using our CircleCI environment.
Up until Thursday evening, we had had various ideas of using (see: building & maintaining) different tools, or utilising an entirely separate service, to achieve our end-goal.
Ideally, we should have been able to tap…
Recently, I was faced with one of my favourite challenges — the UI implementation kind. The design team, whom I love dearly, demonstrated a mockup to me, and mentioned that they’d “love it” if I could hide and show the view as demoed. AirBNB’s implementation of this effect, below:
Aussie iOS Engineer based in Tokyo, Japan | 日英可