Swift version: 5.2
View debugging lets you visualize exactly how your app is drawing to the screen by exploding your UI into 3D. So, if you're sure you added a button but you just can't see it, view debugging is for you: you can spin your interface around inside Xcode, and you'll probably find your button lurking behind another view because of a bug.
To activate view debugging, first you need to be using iOS 8.0, either on a device or the simulator. Run your app, and browse to the view controller you want to inspect. Now go to Xcode and look just below the main text editor, where the row of debugging buttons live: you want to click the button that has three rectangles in, just to the left of the location arrow.
When you use view debugging your app is paused, so make sure and tell Xcode to continue execution when you're done by pressing Cmd+Ctrl+Y.
SPONSORED Use Paw to build, test and describe web APIs. Paw has a lightning fast native macOS interface to compose requests, collaborate in real-time on API specs, and generate client code for your applications. You can import and export API definitions.
Available from iOS 8.0 – see Hacking with Swift tutorial 18
This is part of the Swift Knowledge Base, a free, searchable collection of solutions for common iOS questions.
Link copied to your pasteboard.