4

I have tried a lot to have a NSAttributedString with Background image and making a corner radius for it . Basically i want to achieve the same result as BASECAMP to-do . it shows task name with the assigned person and comments on that task . the assigned person or comments changes the line if it don't fit the same line .

I am using the UILabel inside the UITableViewCell which resizes as per the content. So i need to use the same UILabel . And change the Text inside the UIlabel to achieve the Basecamp To-do list.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
coreDeviOS
  • 1,468
  • 2
  • 14
  • 27
  • Couldn't add photo as per my reputation points [link] (http://i60.tinypic.com/33pf1bd.jpg) – coreDeviOS Aug 07 '14 at 05:46
  • What problem are you facing here exactly? – n00bProgrammer Aug 07 '14 at 06:20
  • possible duplicate of [NSAttributedString background color and rounded corners](http://stackoverflow.com/questions/16362407/nsattributedstring-background-color-and-rounded-corners) – ujell Aug 07 '14 at 06:30
  • @n00bProgrammer : I am not able to have that curve as background and the content should wrap to another line if it does'nt fit in same line. it should not break in between. – coreDeviOS Aug 07 '14 at 06:46
  • @ujell: I guess giving layer.cornerRadius is not possible for NSattributedString. – coreDeviOS Aug 07 '14 at 06:47
  • It's possible but little bit tricky. You may also want to check this: http://stackoverflow.com/questions/21857408/how-to-set-nsstrings-background-cornerradius-on-ios7 – ujell Aug 07 '14 at 06:59
  • @ujell : I will try it , But what about wrapping of word. I can elaborate about what i mean by wrapping the word condition. – coreDeviOS Aug 07 '14 at 07:09
  • CoreText can help ? if Yes. How ? – coreDeviOS Aug 07 '14 at 09:32
  • Sorry but I'm not sure for both of them. Alternatively, you can consider adding different labels to end of the first label. – ujell Aug 07 '14 at 17:13

0 Answers0