Xcode is now interrupting your app and handing the reigns to the debugger, just as if you had paused your app with the pause button on the Debug bar. Alternatively, go to Debug\View Debugging\Capture View Hierarchy. Go back to Xcode and click on the Debug View Hierarchy button in the Debug bar. If you’re unfamiliar with how CocoaPods works, please take a look at this CocoaPods tutorial here on the site before proceeding. Note: The library uses CocoaPods to manage its dependencies on other libraries. To get started, head over to the GitHub project page, download the source code, and unzip into a directory. The UI for this library should look very familiar, as Jesse built it to look similar to the Messages app. The library you’ll use in this tutorial is JSQMessagesViewController, written by Jesse Squires. Instead, you’ll inspect the view hierarchy of an open source library to better understand how it was written - without even looking at any code. So, are you ready to write some code? That’s too bad, because you won’t. This tutorial will take you through all the different options that are at your disposal. Instead of printing frames to the console and trying to visualize layouts in your head, you’re now able to inspect an entire view hierarchy visually – right from within Xcode. It pays to know the technique of view debugging – and this has never been easier with the advent of Xcode 6. When you’re developing an app, sometimes there may be a bug with your views or auto layout constraints that isn’t easy to find just by looking through your code.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |