title: How to rotate UIButtons 90 degrees, without Auto Layout error?
body: <p>I have a few UIButtons in an outlet collection array which I wish to rotate with this code:</p>
  
  <pre><code>for(UIButton *button1 in b90){
      button1.transform = CGAffineTransformMakeRotation( ( 90 * M_PI ) / 180 );
  }
  </code></pre>
  
  <p>Unfortunately it doesn't work. It does work if I give it values which will rotate it 180 or 360 degrees e.g. pi or 2 pi etc. (basically meaning the button will be in the same place), but if i give it any other values that will leave the button at a skewed orientation I get this error:</p>
  
  <p>Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Autolayout doesn't support crossing rotational bounds transforms with edge layout constraints, such as right, left, top, bottom. The offending view is: >'</p>
  
  <p>The frame and transform parts are self explanatory. I think it just is saying it doesn't want the buttons to be skewed at all. I can avoid the problem by dechecking the 'Use Autolayout' button in the xib file, but that makes the rotated buttons look pixelated. The unpixelated if you rotate the iDevice in run time, then rotate it back for some reason, but this isn't what i want.</p>
  
  <p>Any ideas as to how to orate the buttons and not disable the 'Use Autolayout' option?</p>
  
  <p>All help is greatly appreciated and i always check the best answer!</p>