So I want to make something like this using swift and xcode:
Where I get each dot from an array. What I have thought is to make a UILabel and make a for loop that iterates over the array and in each iteration it adds to the label \u{2022} + content. I know \u{2022} is the dot point in unicode, the problem is that I need a way to make the list divided in two columns as shown and to make the dot point color yellow. This cant be done if I add the dots programmatically as I described above because the default color would be black. As the number of dots varies from the array contents for example if the array is of size 3 then only 3 dots would show 2 in the left and one to the right I need a way to meet this requirement, the other method I thought was of having two table views that takes half the screen and add this elements to each table view depending on the array. What should be the best practice here or is there a way to make this in the storyboard in a form that is dependent of an array.
In Swift tabStop will work with the following changes
I was not happy with the solutions above. So here is a Swifty function to get a bullet point list:
And this is how you use it:
use 2 labels inside a view for the columns. both labels being multulined
and simply use
Helper.bulletedList
to create your bulletted list as Attributed text for the labelFor Swift 4, you can use this class:
To use it: