IOS development and Reveal usage

Source: Internet
Author: User

IOS development and Reveal usage

This is the background of the story.

Wang has recently changed a new boss, the product team is new, and the test team is new. He is the only one responsible for iOS development. Some former bosses urged the project, and some others tried to block bugs, it's so hard... Originally, the design MAP specially designed for the product would be like this.

But in fact, the design diagram provided by the product is as follows:

Sure enough, the ideal is full, and the reality is very skinny. The hard-pressed Wang Er Ran to ask the product: "How can I determine the size between the UI elements ?" The product said: "You can decide, just look at the same as the prototype diagram ." Hehaoha, this answer and "I want to make a picture ." "What image ?" "The figure you want to buy at a Glance ." What is the difference?

However, Wang Er quickly completed the ui part and gave it to the product. After watching the product for three seconds: "Hey, is the position of your input box up to 3 pixels?" "How many pixels can a button be smaller ?"...... According to the requirements of the product, Wang made a change and showed it to the product. The product said a bunch of pixel things. Wang Er collapsed and pulled the product aside. Every step of the change, he ran a program and showed the product the effect. In this case, change the code -- run -- Display Effect -- product Pull -- change the code -- run -- Display Effect -- product pull ....

Wang is crazy .....

After Wang told me about his experience, I asked him: Do you know an app that can modify the ui size and display it in real time?

Wang 2 :......

Okay, let me tell you.

This software is the famous Reveal,

First, download the trial version (this software is recommended to be worth the money) and install it. Well, it looks like this.

After the installation is complete, it is time to configure

1. Open the command window and create a. lldbinit file in the root directory. Enter the following command and press Enter.


vim ~/.lldbinit
2. Press enter and enter the following code:



command alias reveal_load_sim expr (void*)dlopen("/Applications/", 0x2);command alias reveal_load_dev expr (void*)dlopen([(NSString*)[(NSBundle*)[NSBundle mainBundle] pathForResource:@"libReveal" ofType:@"dylib"] cStringUsingEncoding:0x4], 0x2);command alias reveal_start expr (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];command alias reveal_stop expr (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStop" object:nil];
The preceding four commands mean that four aliases are set for lldb. The meanings of these four aliases are as follows:


Reveal_load_sim: the dynamic link library called when the simulator loads reveal

Reveal_load_dev: dynamic link library called when a real machine loads reveal

Reveal_start: Start the reveal debugging function.

Reveal_stop: Disable reveal debugging.

After entering these commands, enter the following command and press enter to save and exit the editing mode.




3. Configure reveal link in the project to the simulator

After opening the project, place the breakpoint in the didfinished: Method in appdeleget and press edit breakpoint:


After hitting the breakpoint, you can select the simulator to run the project. When the project starts running, open reveal and click the project in the upper left corner to view our project.

Select our app project to view our ui layout in reveal.

I will not talk about what I did on the left, the ui of the current page in the middle, and the size and position information of the ui elements on the right. In the corresponding box on the right, you can modify the values and display them instantly.

Xcode also provides this instant ui viewing function, but it cannot be dynamically modified in real time. Therefore, it is easier to use reveal. After modifying the element size of a page, count on the simulator to the next page, return to reveal, and re-Connect

Reveal can also link to the real machine during debugging and change it to the corresponding command when editing the breakpoint. Add the dynamic link library of reveal to the project:

1. Click "help --" show reveal library in finder "in the revel menu to find the dynamic link library libReveal. dylib Of reveal and drag it into the project.

2. Adjust libReveal. dylib reference method. Here we only need to set libReveal. the dylib file is copied to Sandbox, but we are introducing libReveal. in dylib, Xcode uses Link Binary With Libraries by default. In fact, it should be Copy Bundle Resources. Therefore, you should first set libReveal. dylib is removed from Link Binary With Libraries and added to Copy Bundle Resources.

3. Modify the command at the breakpoint to reveal_load_dev.


Reveal can also connect to the cracked version of the Apple device to view the appUI structure of other homes. I have never used this method. You can find information on the Internet.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.