Last Updated: February 25, 2016
· logicreative

Change simulated metrics in Xcode

It is not possible to change the Simulated Metrics to custom values by Xcode. So everybody having a non-default-size-navbar for example has no option to simulate his custom bar height in the Interface Builder. A possibility is to design the custom navbar and copy it everywhere instead of the navigation, but then it is not simulated any longer.

If this is no option you can "hack" Xcode by jumping to the location
/Applications/ and open CocoaTouchConstraints.plist In this file you can set the value of NavigationBar to the desired values. So if you want a Navigation Bar that is 60 high just set Maximum and minimum height to 60:

<string>{10000, 60}</string>
<string>{0, 60}</string>

After saving you need to restart Xcode and you NavigationBar will have the desired height.