inputtoolbar
inputtoolbar copied to clipboard
Properly align text field when using on iPad
When view is used on iPad, the position of input field (UIExpandingTextView) is misaligned after autorotation. It looks like it can be fixed with code like this
self.textView.autoresizingMask = UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleWidth;
when setting up toolbar. I didn't look further though to find a way to make input field wider when used on iPad screen. It can be surely done by detecting device in runtime.
Hi, Thanks for the feedback. I have not tried to use this on the iPad at all.
To make the input field wider, you would probably just need to set the correct value for the frame boundary when the toolbar creates the textview component.
Look at line 73 of the UIInputToolbar.m file
self.textView = [[UIExpandingTextView alloc] initWithFrame:CGRectMake(7, 7, 236, 26)];