Detailed Description: use Interface Builder to design the Program Interface

Source: Internet
Author: User

UseInterface BuilderTo design programsInterfaceIs the content to be introduced in this article, mainly introduces the useInterface BuilderDesign ProcedureInterfaceFor more information, see the details.

1,CocoaUIKit andCocoaThe AppKit works the same. These two frameworks are similar concepts, but they are obviously different on different platforms. On the other hand, Foundation framework libraries such as NSString and NSArray are shared on Cocoa and Cocoa Touch.

2. IBInterface Builder). When you click the. xib file under Resource, the IB starts. (If you do not see the control bar, click the Tools/Library menu in the IB menu ). It is intelligent. If an object does not accept a subview object, you cannot drag and drop the subview object to this object. The label object is an instance derived from UILabel. Find the Label control and drag it to the View interface. Double-click the label you created and enter Hellow, World. Drag and Drop it to adjust it to the position you want to place, save it, and return to Xcode, run Build and Run to see the effect. To adjust the attributes of a Label, such as the font and color, you only need to click it and then press command + 1 or menu tools/inspector to set its attributes.

3. IB does not need to maintain any code. It creates an Object-c Object to automatically generate relevant code. When the program runs, it serializes the object into a nib file so that the object can be directly loaded into the memory. This will avoid any issues caused by manual code.

The figure in the 4、 is 57x57133, in the format of .png. I used a windows paint brush tool). I don't need to modify the corners, as long as it is designed to be flat and square. IB will automatically adjust the corner and three-dimensional effect of the image. Watermark image.

5. After creating .png, click the Resources folder on the main Xcode interface, and click the Project/Add to Project menu. Remember, select "Copy items into destination group's folder (if needed, add the image to the project and select info. plist. In attribute settings, set the value of the icon filedouble-click to the file name, for example, snb.png. Then, you can see that the program icon has changed to your own icon.

6. Bundle identifier in info. plist is the information that uniquely identifies an application and is required. There is no problem when using the iphone simulator, but if you want to run the program on the iPhone, you need to apply for the bundle identifier item of the application through some additional application steps. Now, we can set this item to com. snbworkshop. HelloWorld,

7. If you want to delete applications on the iPhone simulator, you can find and delete the content in the following directories on the MAC hard drive:

User main directory/resource library

 
 
  1. /Application Support/iPhone Simulator/User/Applications/ 

Summary: Usage DetailsInterface BuilderDesign ProcedureInterfaceI hope this article will help you!

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.