Nov 3, 2020, 7:51 PM
Welcome to WordPress. This is your first post. Edit or delete it, then start writing!
Jun 23, 2020, 2:08 PM
Like all of you, I’m really excited about the updates to Swift UI being introduced at WWDC 2020. I’ll be updating old blog posts to reflect improvements as I watch the videos and get a chance to experiment.
Oct 28, 2019, 8:21 PM
WWDC 2020: Text now provides an initializer that accepts a single Image, this blog post will be updated or removed to reflect that. For now here’s the correct code. Often you need to include images inline in text, while being...
Oct 24, 2019, 7:48 PM
In the last post we looked at view modifiers as a way of building custom UI components that use other views as a form of content. In this one we’re going to look at a different approach using ViewBuilder. We’re actually going...
Oct 24, 2019, 7:27 PM
We’ve spent some time looking at views without really diving into what a view is, and considering what other options are available to us. Let’s look at that now. View is a defined as a protocol: This means that to conform to...
Oct 15, 2019, 5:41 PM
Occasionally we come across a layout where we need to limit the bounds of a view in a particular dimension. For example we might have a view where we show the character portrait along with the title they might be introduced by at court....
Aug 8, 2019, 3:58 PM
It seems a little odd to write a post about borders this late, since every post so far has already used them without calling them out explicitly. In each of the examples I’ve added borders to the code given to better illustrate the...
Aug 8, 2019, 3:50 PM
By now we should be used to the idea that all views in SwiftUI choose their own size, for example a Text view has the size required to render the string provided: Creates a view with the exact bounds necessary: We also showed that the...
Aug 8, 2019, 12:42 PM
For most layout needs we can combine stacks and flexible frames, allowing us to make views and controls put together from fixed size primitives views upwards. For more complex layout needs, another option is to use GeometryReader. This is...
Jul 31, 2019, 10:40 PM
Secondary views are one of the more interesting layout tools available in SwiftUI, to understand them first we have to recall that views have fixed sizes. To recap the process: Parent proposes a size to its child. Child decides on its...