title: how to get current size of a subview when device size changes in swift?
body: <p>I have to view: view_1 and view_2 . view_1 height is proportional to the main view controller height and I am adding view_2 programmatically as a subview of view_1 with a proportional height.</p>
  <p><strong>Problem</strong></p>
  <p>when the device size changes say from iPhone 6 to iPhone 5, the view_1 adjust correctly but its height I am passing to a function to draw its subview view_2 is still what was set in interface builder and so it is out of bounds in iPhone 4 moving from iPhone 6</p>
  <p>Thus I want to know how can I get the correct size of a view that what resize automatically to fit the current device?</p>