iOS uses reveal to debug the interface 1--simulator (step through)

Source: Internet
Author: User

Reveal is a program interface debugging tool that can debug iOS apps and tvOS apps. Using reveal, we can dynamically view and modify the application's interface at development time. Avoid re-running the program every time you modify the UI. Next, according to the rules, such as, can be illustrated clearly with the diagram without words to express, the expression of the text is not intuitive.


Reveal program run

1, such as "reveal program run" as shown, I use the reveal officially provided by the project to debug demo, the most left is the demo in the simulator running effect, the right app is reveal, I first saw this reveal a kind of amazing feeling. The top left side of the app is the simulator I'm debugging right now, and the bottom left is the middle part of the Uiview,app that I'm looking at at the moment for UI details is the device interface that's being analyzed at the moment, and the app's rightmost look is a little bit like the Xib editor of Xcode. That's right. This is where the UI can be dynamically viewed and modified. This modification is similar to Xcode's Xib UI details, and I believe you have a very good feeling about this, as long as you have a little bit of review to get started.


reveal viewing the UI

2, as shown in thereveal View UI diagram,the dimensions of the reveal viewing UI are also selectable, with either a two-dimensional view or a three-dimensional perspective. I chose a three-dimensional view, as shown in the left click to expand the level of UIView, click the corresponding view to see the corresponding constraints of the view, in such a way to see the UI constraints is too intuitive.

using reveal to debug the interface of our app in the simulator is the simplest. You only need to add the corresponding breakpoint.

1. In the Xcode project, select "view→navigators→show breakpoint Navigator".

Add Symbolic Breakpoint "

2. On the left bottom panel, click the "+" button and select "Add Symbolic Breakpoint".

3. Enter "uiapplicationmain" in the Symbol field.

4. Click on the "Add action" button and confirm that "action" is set to "Debugger Command".

5. Paste the following expression into the text box under Action

Expr (Class) nsclassfromstring (@ "ibarevealloader") = = nil? (void *) Dlopen ("/applications/reveal.app/contents/sharedsupport/ios-libraries/libreveal.dylib", 0x2): ((void*) 0)

Check Options

6. Check that the option "automatically continue after evaluating actions" is checked.


Move Breakpoint To→user

7. Right click on the new breakpoint and select "

Move Breakpoint To→user

"Save to all projects using.


Open reveal

8, compile, run your program on the emulator, and then open reveal to view your layout.

Due to the limited space system, the commissioning of the real machine in the next article added ...

iOS uses reveal to debug the interface 1--simulator (step through)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.