Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Programming \ About Auto Layout and frame     - On the design of Oracle database backup (Database)

- Variables Python variables (Programming)

- Oracle JDK installation under Ubuntu Linux (Linux)

- 11G ASM disk group does not automatically handle MOUNT (Database)

- How to use scientific data Docker quickly configure the development environment (Server)

- Close and limit unused ports computer server security protection (Linux)

- Using monitoring tool dsniff (Linux)

- PHP interview questions of design patterns (Programming)

- 20+ Best Practices article MySQL Performance Optimization (Database)

- ActiveMQ5.11.1 and JDK version matching relation (Linux)

- Linux / Windows setup is complete port range (Linux)

- How comprehensive resist attacks from the network (Linux)

- Openfire achieve load balancing cluster by Nginx (Server)

- Linux Kernel 4.2.2 compiler installation tutorial (Linux)

- KVM usb passthrough configuration (Linux)

- Oracle Database ORA-01555 snapshot too old (Database)

- To install Emacs under CentOS 6.5 (Linux)

- CentOS NAT iptables (Linux)

- ORA-600 [kcbz_check_objd_typ] Error Handling (Database)

- Linux set to select the appropriate level of security of the network according to deployment (Linux)

  About Auto Layout and frame
  Add Date : 2018-11-21      
  Used Auto Layout will certainly have encountered the situation obtaining less than the true frame, and most people can get through a simple search for a satisfactory solution: Before you want to get real about the call frame self.view.layoutIfNeeded () this is not a good method, but can be: carried out without additional frame computing needs.

We View Controller life cycle to analyze the problem:

Auto Layout layout is from outside to inside, from the beginning of the layout of the screen size, the layout has been to the innermost details of the elements, our eyes naturally fall on the viewDidLayoutSubviews and viewDidAppear:

viewDidLayoutSubviews the current view of the handle element has layout is completed, frame has been formed
viewDidAppear, the rendering system added to the current view of the parent view, displayed on the screen
Therefore, the solution is already get to the bottom:

Avoid calling layoutSubviews, conducted in frame acquisition and viewDidAppear in viewDidLayoutSubviews
If you need to do some big action as soon as possible, it is recommended viewDidLayoutSubviews, then the user has not seen the UI, more flexible usage
Note viewDidLayoutSubviews may be called multiple times, so the added element of the class action to avoid doing here
viewDidAppear can dry everything you wanted to do things, but some require the user to see things like animation can do here
Recommended more needs to be done to try to put all the viewDidAppear do, allowing users to see the screen as soon as possible, which is the basic principle of human-computer interaction
Back to the question in the title: when to get in the right frame viewDidLayoutSubviews and viewDidAppear in?.
- Encrypted with GnuPG signature to verify the authenticity and integrity of downloaded file (Linux)
- RHEL6.4 x86_64 build SVN service (Server)
- Java memory-mapped file MappedByteBuffer (Programming)
- Adjustment expand VMDK format VirtualBox disk space (Linux)
- Oracle row and column switch to turn columns (Database)
- RHEL7 system making use of OpenStack mirror (Linux)
- Vim configuration instructions (Linux)
- How to install Laravel PHP framework on CentOS 7 / Ubuntu 15.04 (Server)
- CentOS 6 Install Xen4.2 Virtualization Practice (Linux)
- Bug tracking library after FastJson omitted the decimal point 0 (Programming)
- CentOS 6.5 boot automatically mount the hard drive (Linux)
- Setting Lns firewall against ARP attacks (Linux)
- Nginx + ownCloud + PHP + MySQL to build personal private cloud under CentOS7 (Server)
- Git commands (Linux)
- Make command tutorial (Linux)
- Developing a Web server yourself (Server)
- Compare Oracle MySQL (ICP) index condition pushdown is described (Database)
- Use the dd command to the hard disk I / O performance test (Linux)
- Based on OpenSSL for HTTPS service configuration (Server)
- RHEL 6.5 x86_64 CentOS yum configuration source (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.