1

Please any one can tell me how to add the lines in the UITextView like notes app in the iphone . i followed some tutorials but am not able to understand.. am looking for a simple way to draw the lines in the textView..Please help me..

Thanks in advance,

suvarna
  • 697
  • 2
  • 7
  • 10
  • You can subclass it an add a backgroud image in lieu of the white color. – WhoaItsAFactorial Nov 26 '12 at 15:08
  • 1
    Or you could make the UITextView transparent BG and put an image behind it. – Fogmeister Nov 26 '12 at 15:08
  • Check this http://stackoverflow.com/questions/5375350/uitextview-ruled-line-background-but-wrong-line-height/5453189#5453189 and http://stackoverflow.com/questions/7789747/uitextview-ruled-line-to-be-adjusted-with-the-text – TonyMkenu Nov 27 '12 at 17:46

1 Answers1

2

Simply make an background image for your textView which contain lines, and then set it to your textView.

[yourTextView setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"yourImage.png"]]];  

Or follow this answer too Link

Community
  • 1
  • 1
Rajneesh071
  • 30,846
  • 15
  • 61
  • 74
  • ok thanks for the advices, actually i know how to set image as a background to textView..But my problem is that how to get that type of image to set as a background image with lines to UITextView ?. Please share the link of that kind of image if any body having ... – suvarna Nov 27 '12 at 05:13