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.
you can use property textcontainerinset
following example of george green:
mytextview.textcontainerinset = uiedgeinsetsmake(0.0f, 10.0f, 0.0f, 10.0f);
Comments
Post a Comment