Analysis view level and view level

Source: Internet
Author: User

Analysis view level and view level

1. Method 1:

The hidden command is recursiveDescription. You can simply use it to check the view and call recursiveDescription in the view to print its inheritance relationship. Because it is a private method, no prompt is displayed when you type it. Do not enter an error. That is, in the debug area. Enter po [self. view recursiveDescription] 2. Method 2:

UI is a very important part of iOS development. During debugging, we generally use a simulator to perform testing on a real machine before submission. Although it is quick and convenient to debug the UI effect using a simulator, it is still expected to have more powerful tools to help analyze the UI, especially when debugging the UI effect. Recently, I saw the Reveal tool and found that it is really powerful. Similar to FireBug on FireFox, the display on the UI Layer is clear and intuitive and can be conveniently used for UI debugging, it is also a powerful tool to learn how to use the UI.

This tool is now available in the official version and requires money to purchase. Fortunately, you can download the trial version for 30 days. (Http://revealapp.com), it is said that there is a free Beta version in the past, which is big if there is, please share it with me, thank you.

Installing Reveal is not complicated. To use Reveal in the project, you need to compile the framework or dylib.

1. Open the Xcode Project

2. Open the Revel tool and select Menu-> Help-> Show Reveal Library in Finder to open the Library in RevealApp.

3. Add Reveal. framework to the project. In the pop-up box, select Copy items into destination group's folder (if needed ).

4. In the Project Settings, add-ObjC-framework Reveal to the Other Linker Flags item.

If you are still using Xcode4, you also need to add-frame CFNetwork-frame QuartzCore-framework CoreGraphics

5. you can run your application on a simulator or on a real machine, but you must ensure that Reveal and your device are in the same network, and then select the Link Target in Reveal, after the application is connected, the UI is displayed. Each layer and element can be displayed and the data can be viewed.

The description here is to link Reveal to the application as a static library, or load it as a dynamic library. Of course, the settings are slightly different and need to be in AppDelegate. add the load and remove code to the m file.

The most powerful thing is that some people have developed a Reveal method to watch the UI of any app, which is not complicated. This method belongs to the category of reverse engineering and is still good in UI learning.

Related Article

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.