[iOS11] contentinsetadjustmentbehavior problem, push back, the interface will move up and down.

Source: Internet
Author: User

https://stackoverflow.com/questions/45573829/ Weird-uitableview-behaviour-in-ios11-cells-scroll-up-with-navigation-push-anima

In your Tablview/controller base class settings

if 11.0, *)) {        = uiscrollviewcontentinsetadjustmentnever;    }

Do not use [UIScrollView appearance] the "method, do not take effect.

PS: Search This question, the domestic multiple articles are copied the same article, and is wrong.

The following is wrong.

  1. It is now found that all scrollview and their subclasses need to be set contentinsetadjustmentbehavior = Uiscrollviewcontentinsetadjustmentnever,
  2. The students who use the list in the project do not panic, do not be busy, because UIView and its subclasses follow the Uiappearance protocol, we can make a global configuration:
  3. Appdelegate Making Global Settings
  4. if (@available (IOS 11.0, *)) {
  5. [[Uiscrollview appearance] setcontentinsetadjustmentbehavior:uiscrollviewcontentinsetadjustmentnever];
  6. }
  7. This allows you to use UITableView, Uicollectionview, and Uiscrollview without having to set this property separately.

[iOS11] contentinsetadjustmentbehavior problem, push back, the interface will move up and down.

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.