YichenBman
YichenBman

Reputation: 5661

Custom Bullets from Images on UITextView or UILabel Swift

I'm creating an app that basically is a mobile version of a large website. This website has a certain area that lists product features. Each feature is bulleted with a unique custom image.

Is there a way to do this with swift? Essentially, create a bullet list of strings, but instead use small images for the bullet dots?

Upvotes: 3

Views: 2348

Answers (1)

Randhir Singh
Randhir Singh

Reputation: 111

  • Make your UITextView's text type as attributed

    enter image description here

  • Increase the Head indentation value

    enter image description here

  • Construct your string in the following format:

    "• This is a string\n\n• This is another string, but longer and better. The number of words in this string are probably higher than the last one."

  • Use Alt + 8 to type in a bullet.

  • Result:enter image description here

Upvotes: 8

Related Questions