iphone - How to set a margin in UITextView? -


i'm developing simple text-editing app ipad. want set left/right margins attached picture. adding uitextview uiview larger width won't work because scroll indicator won't located.

instead of uiview, added uitextview uiscrollview, , works fine. show strange behaviors, , uitextviewdelegate doesn't work uiviewcontroller.

is there way set left/right margins using uitextview? thank you.

alt text

you can use property textcontainerinset

following example of george green:

mytextview.textcontainerinset = uiedgeinsetsmake(0.0f, 10.0f, 0.0f, 10.0f); 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -