I am working in an app in which I need to give feature like Notes App in iphone. as shown in first screen shot , initially , notes leaves a tab before the content starts, I also wanted to do the same and for that when I set Left Content inset (of UITextView) by 25 , it shows like in screenshot 2, here you may see the image also gets shifted. I have set image as background. I don’t know how to solve this problem.
I also tried by adding image as subview of UITextview but it won’t repeat the lines, while scrolling (image of lines) like notes app.

I’m setting the background of Textview by following code.
[textView setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"line_image.png"]]];
Please tell me if I am going wrong or any extra effort needed to get desired output.
Thanks
@Dinesh gave nice solution but it doesn’t sound to be generic as I want to use image of lines instead of drawing them. Image has some special effects that can not be achieved by drawing. So to solve it I created a table view below the textview keeping textview’s background transparent. Now just added the image of line to my tableview’s custom cell and set content offset of UItableview same as of the scrollview (subview of text view ,refering to the answer of @Vladimir ) .
And used the following code to scroll my tableview with scrolling the textview and got the desired output.
Keeping my tableview’s number of rows at a very large number.
PS: instead of setting the content inset of textview, i set its frame’s X position and decreased the width relaively.