1

I'm new to coding and am stuck on formatting what I want to write. I need it formatted with bullet points and spaces. The easiest would be to just screenshot the page but I'd rather be able to change the words if necessary in case of changes later. Below is an example of what a protocol page looks like. That's what I need. Not a big run-on sentence.

How might I be able to accomplish this in Swift?

Here's an exampleenter image description here

KSigWyatt
  • 1,368
  • 1
  • 16
  • 33
D. Duong
  • 19
  • 3

2 Answers2

1

You have a few options:

• You can use a font symbol, like this: • (or an Emoji) inline with text.

• Use a customized webview to show stylized content.

• Render each line and custom bullet in Quartz.

You could also use the Unicode code point for the bullet character in your string.

myLabel.text = @"\u2022 This is a list item!";

Format UILabel with bullet points?

Casey West
  • 578
  • 5
  • 22
1

For long, complicated, pieces of text, you can use HTML and a WKWebView or instead use NSLayoutManager (which may be a bit complicated if you're just getting started), as described in the Text Layout Programming Guide.

Matusalem Marques
  • 2,399
  • 2
  • 18
  • 28