0

Xcode 8.3.2

As as newbie, I'm trying to get acquainted with segues, constraints, text fields and Image Views...mainly the design elements. I'm trying to put together a cheesy recipe book of favorite recipes. I wanted to know what's the best approach to display rich text with bold text and bullet points? Labels seem to be my only option but I was wondering if there were other options? Any advice would be appreciated.

ViewController in Storyboard

Joe Vargas
  • 65
  • 7
  • 1
    You can add bullet points with this unicode char: https://stackoverflow.com/questions/5533851/format-uilabel-with-bullet-points. You have choice between UILabel and UITextView (I think that TextView will be better and easiest for you ). TextView will give you easiest usage of scrolling,clicking on resources like phone, email, links etc. – Damyan Todorov May 28 '17 at 16:00
  • Thinking outside of the box.... why not use a `WKWebView` and Markdown? Last week an email newletter pointed out this code (https://github.com/keitaoouchi/MarkdownView) which I'm thinking of adding "Release Notes" to my apps. No, it's not "RichText" (which may not be open source) but you pretty much get everything you want this way - including source code to help you not need third party code. –  May 28 '17 at 16:06

2 Answers2

1

As much for my approach, during my career I learned that textViews (aka C# RichTextBoxes) can be pretty tricky..

You can go with classical UILabel approach with lines in Interface Builder set to 0 and atrributedText, which contains bullet points: This is a nice tutorial, but a bit old and would probably do it another way, but I guess for the purposes is fine...

https://wingoodharry.wordpress.com/2016/04/10/bullet-point-list-ios-swift/

I would like to state here, that TextViews are the last option everywhere with text...

Wish happy coding! :)

Dominik Bucher
  • 2,120
  • 2
  • 16
  • 25
0

UILabels are best way to display text, you can use attributedText in UILabels which will enhance your UI. Multiline text is a add on.

Else try using AsyncDisplayKit.

Sahil Jaidka
  • 271
  • 1
  • 5
  • 13