title: iOS - Resize UISwitch in UINavigationBar
body: <p>I am trying to use a <code>UISwitch</code> in my <code>UINavigationBar</code>. I want a smaller switch than the default, so I am scaling the size down with <code>anonymousSwitch.transform = CGAffineTransformMakeScale(0.55, 0.55);</code> When I do this, the switch shrinks, but I cannot figure out how to align it vertically with the other elements in my <code>UINavigationBar</code>. 
  Here is what it looks like currently:
  <img src="https://i.stack.imgur.com/E4aCz.png" alt="enter image description here"></p>
  
  <p>Ideally, the <code>UISwitch</code> would be spaced away from the 175 <code>UILabel</code> as much as the X <code>UIButton</code> is spaced from the 175 <code>UILabel</code>, and the <code>UISwitch</code> would be in a straight line with the rest of the elements in the <code>UINavigationBar</code>. I tried doing <code>switch.center = CGPointMake(switch.center.x, shareButton.center.y)</code>, but this did not affect the placement of the <code>UISwitch</code> at all. 
  Is there any way for me to position the switch like I want?</p>