title: Change imageview height programmatically ios
body: <p>I have this kind of structure in storyboard:</p>
  
  <pre><code>UIViewController &gt; View &gt; Scrollview &gt; Scrollview &gt; UIImageview
  </code></pre>
  
  <p>By Default imageview size is : 320x230. Check below image:</p>
  
  <p><a href="https://i.stack.imgur.com/jnbcV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jnbcV.png" alt="enter image description here"></a></p>
  
  <p>Now i need to change size of that imageview Programmatically.</p>
  
  <p>Lets say i need to set frame : 320x280</p>
  
  <p>Autolayout is disabled see image:</p>
  
  <p><a href="https://i.stack.imgur.com/l0ayW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l0ayW.png" alt="enter image description here"></a></p>
  
  <p><strong>Here is what i have done:</strong></p>
  
  <pre><code>override func viewDidLayoutSubviews(){
      super.viewDidLayoutSubviews()
      imgThumbnail.frame = (frame: CGRectMake(0, 0, self.result.width, 280))
  }
  </code></pre>
  
  <p>But its not working at all. Its not changing size of imageview. One more important thing is when i scroll down &amp; up the scrollview. It takes the new frame which i have set in above code in imageview.</p>
  
  <p>It will be great if someone guide me resolve this issue.</p>
  
  <p>Thanks in advance.</p>