Layout problems in IPad/IPhone Development

Source: Internet
Author: User

I initially learned how to develop IOS (IPad/IPhone). I spent a lot of time on the Interface layout in the past two days.

There are two methods for IOS interface:

1. Create an Interface using Interface Builder and associate it with the corresponding controller.

2. manually add UI components and layout through code

Advantages and disadvantages:

Method 1: The interface can be created quickly, easily, and easily maintained. The disadvantage is that it is not dynamic enough. It is said that the performance will be worse (because XIB files need to be read ).

The advantage of method 2 is that it is flexible and controllable. The disadvantage lies in the advantages of method 1.

My personal experience on these two methods:

* Use method 1 to divide components. Each function has its own independent View & Controller.

* Use method 1 for overall layout

* Use method 2 on local dynamics

Other considerations:

* Performance: multiple views and controllers may consume resources.

* How to support rotation: Adjust the layout manually after rotation

Experience Sharing:

* General Layout and control: Navigation, Tab, and Split

* Other useful views: UITableView and PageControl

* A Good Example UICatalog (in the ios sdk documentation): contains a variety of UI spaces and common la s

* The toolbar does not support Landscape. It should be a bug.

At present, we are still exploring complicated interface layout and control, and will share more experiences in ios interface development.

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.