title: Autolayout how to get computed value from view
body: <p>There is one thing that is really making me crazy about auto layout , I'm doing my tests and found that if you subclass a UIView and you put some views with their constraints is impossible to know the computed value. <br>
  Let't say that we have a TestViewClass that inherits from <code>UIView</code>, we've got some subviews inside. we want to use it for iPhone and iPad, so we use in two sizes, let's suppose 100x100 and 200x200 we made our constraints to make everything work. We build this view placing those subviews in some positions. <br>
  Now we need to build another subviews that contains a number of buttons as subviews (contentView) which number is given at runtime.<br>
  The algorithm will pick the size of this content view and put the correct number of buttons calculating the space between them in a way that the will be at the same distance from each other but covering the whole content view width. For example, the contentView is 200 point in width, buttons are 3 and squared with a side of 60. Together they cover 180, so we have 20 points left that should be placed as a space between the buttons->10 points. <br>
  That's pretty easy, made thousand of times before auto layout. To do that I need the width of the contentView which has some constraints to its superview that make it resize its width according to superview size, the problem is that I can't find any place inside UIView implementation where I can get the final value of the size of the contentView.<br>
  I tried view <code>-layoutSubviews</code>, <code>-updateConstraints</code>, <code>-didMoveToSuperview</code>, value show are alway the original one. When the new frames are calculated?<br>
  I clearly didn't get something about auto layout...<br> <br><br>
  <br>
  I discovered this problem trying to set table view cell height, trying to make them appear all on screen independently by the size of the table view. here is the related question <a href="https://stackoverflow.com/questions/17122284/autolayout-in-uiview-where-is-safe-to-ask-computed-layout-values">other question</a></p>