I have created Custom UITextView
class ,where textView grows dynamically as user types characters and textview frame resized dynamically.I want to align the text vertically center in the frame,it always coming to bottom by default.I added UIEdgeInsets
to make or look a like it into center but it creates more issues for me.If i try to set content offset then the textView center also shifts.Is the content offset and textView center effect each other ?.I want textview center where ever it is but the text inside the textView stays vertically center.
Initially i am setting UITextView font 23.0 with a rectangular border(textview frame layer border).When i start typing in that box the text is coming on bottom of the border.Then i am using
[textView setContentInset:UIEdgeInsetsMake(5,0,10,0)];
to make text in center. Then i have to send this text for printing which is placed on an UIImageView.Here i am using the mentioned code by Paras to match printer dpi and resizing it.But the text as looks on UIImageview doesn't match the exact placement of print because i have added UIEdgeInset to adjust vertical alignment