Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom input views: how to prevent them from fading during orientation change?
    text
    copied!<p>I am having trouble with assigning a <code>UIControl</code> subclass I made as a text field's <code>inputView</code>.<br> It shows - as expected - when the text field becomes <code>firstResponder</code> and hides when it resigns it <code>firstResponder</code> status.</p> <p>However, the thing I am having trouble with is handling different orientations:<br> I set an <code>autoresizingMask</code> to the control's subviews so that there is a smooth transition when changing its width.<br> The thing is, they appear to be ignored as soon as I set it as the <code>inputView</code>. When enabling the simulator slow-motion animations via triple-hitting shift, you can see very clearly that the view <strong>fades</strong> between the two states.<br> This is not what I want. Firstly it looks odd, and secondly this does not fit my needs. Since the <code>inputView</code> contains a <code>UIScrollView</code>-like element, it would stop its deceleration animation during the fade.</p> <p>Now my question is: Is there a way to prevent the fade from happening? I would really like to use the <code>inputView</code> property since it saves me from writing lots of lines of code.<br> Also, is it possible to specify different heights for different orientations?<br> Here are two demo projects showing how <a href="http://dl.dropbox.com/u/3722472/Coding/Objective-C/How%20it%20is.zip" rel="nofollow">it is</a> and <a href="http://dl.dropbox.com/u/3722472/Coding/Objective-C/How%20it%20should%20be.zip" rel="nofollow">how I want it to be</a>.</p> <p>Thanks in advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload