The documentation about autolayout refers to setting NSViewShowAlignmentRects
to show the alignment rects around the UIView
objects in the app.
I've tried setting it for Xcode, but it shows the rects for Xcode itself, not the app when it runs in the simulator.
defaults write com.apple.dt.Xcode NSViewShowAlignmentRects -bool YES
To do this using the scheme editor in Xcode:
In Debug, the Arguments tab, Arguments passed on launch, click the plus button and enter this:
-UIViewShowAlignmentRects YES
(for iOS projects)
or-NSViewShowAlignmentRects YES
(for Mac OS projects)
You should have a bunch of yellow outlines when you run
Add this code:
[[NSUserDefaults standardUserDefaults] setBool:YES
forKey:@"UIViewShowAlignmentRects"];
[[NSUserDefaults standardUserDefaults] synchronize];
And then restart the app for it to take effect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With