Creating a Tag Cloud for macOS
Creating a resizable and reusable view for a macOS app
Creating a macOS app allows us to use a whole different set of tools than creating an iOS app. In this article we’ll look at one example of a view we can only use at the mac: A Tag Cloud that reacts to resizing and places its tags according to the given space. This is a demo of TagCloudView
:
First, we’re going to look at how to create the rows and how to place tags in them. But this initial setup will not allow resizing, we’ll handle this in the next section. Next, we’ll see how to use and configure the Tag Cloud. At the end of the article, the usage of this view is demonstrated in an app.
Creating the Rows
TagCloudView
consists of many rows, each holding a different number of tags. Here you can see this setup:
First, let’s start by creating the views and see how to place the tags.