0

As the picture I marked in red Rect, how to implement it?

  1. The image and text in the same line;
  2. The text can wrap to the first column;

enter image description here

Raymond Liao
  • 1,799
  • 3
  • 20
  • 32
  • I'm not sure what part exactly is causing you trouble, `NSAttributedString` can add colors, images to UILabel/UITextView. – Larme Oct 24 '16 at 09:43
  • 1
    yourLabel.backgroundColor = UIColor(patternImage: UIImage(named: "Your image name")!) – Maulik Pandya Oct 24 '16 at 09:44
  • Hey, please take a look at the picture in my question. The text can wrap to the first column – Raymond Liao Oct 24 '16 at 09:44
  • @Raniys What do you exactly want? You want an image with label and some particular word in color ? – Jitendra Modi Oct 24 '16 at 09:49
  • @Raniys Please follow my answer into this http://stackoverflow.com/questions/39643542/setting-vertical-align-of-truncated-tails-for-nsattributedstring-with-nstextatta/40105498#40105498 – Jitendra Modi Oct 24 '16 at 09:51
  • Potentially, it's just a custom `UITableViewCell`, with an image, and text, and the level image, the rest, and just using constraint, and excludedPath, they manage to do it. – Larme Oct 24 '16 at 12:24

1 Answers1

0

I've fixed the question as @Jecky Modi's suggestion, please refer to here for it.

Community
  • 1
  • 1
Raymond Liao
  • 1,799
  • 3
  • 20
  • 32