sizes of subviews cannot be changed while superview gets changed properly
<p>I have some more objects but guess I basically have two views and one button. The others don't affect to those objects at all.</p>

<p>expandingView is on the upper side of the screen while the shinkingView is on the lower. They are 8 pixels apart.</p>

<p>By clicking the button, I want to increase the height of expandingView by 30 while that of the other decreases by 30 so that I can get one bigger and the other one smaller in a limited size of area. I coded like below:</p>

<pre><code>expandingView.frame.size.height += 30
shrinkingView.frame.size.height -= 30

shrinkingView.frame.origin.y += 30
</code></pre>

<p>What makes the problem is that I cannot change subviews in shrinkingView. One of them needs to be fixed so it's okay but the other one does need to be changed as its superview changes its size.</p>

<p>The subviews are linked correctly to UIButton variables. I typed the code in the same way as I change the superviews but nothing changed as if the codes I typed do not exist. Literally they have no effects at all.</p>

<p>Why can't they be changed even if the same way of codes are used? It it because they are in a different level of hierarchy?</p>