iOS11AdaptationTips icon indicating copy to clipboard operation
iOS11AdaptationTips copied to clipboard

iOS 11 tableView for header in xib !

Open HolmesZhao opened this issue 7 years ago • 8 comments

Summary

使用 xib 创建 tableView 的 header 的时候出现缺少20的距离

How would you classify this issue?

Choose a problem area with iOS SDK:

  • [ ] Foundation
  • [x] UIKit
  • [ ] Core Location
  • [ ] Keyboard
  • [ ] CFNetwork Framework
  • [ ] AVFoundation
  • [ ] iTunes Connect
  • [ ] App Store
  • [ ] Accelerate Framework
  • [ ] Accounts Framework
  • [ ] App Switcher
  • [ ] Audio
  • [ ] Audio Toolbox
  • [ ] AVKit
  • [ ] Calendar
  • [ ] CallKit
  • [ ] Cellular Service (Calls / Data)
  • [ ] CloudKit
  • [ ] Contacts
  • [ ] Contacts Framework
  • [ ] Control Center
  • [ ] Core Animation
  • [ ] Core Bluetooth
  • [ ] Core Data
  • [ ] Core Foundation
  • [ ] Core Graphics
  • [ ] Core Image
  • [ ] Core Media
  • [ ] Core Motion
  • [ ] Core Spotlight
  • [ ] Core Telephony Framework
  • [ ] Core Video
  • [ ] CoreML
  • [ ] EventKit
  • [ ] External Accessory Framework
  • [ ] GameplayKit
  • [ ] GLKit
  • [ ] HealthKit
  • [ ] HomeKit
  • [ ] Image I/O
  • [ ] Intents Framework
  • [ ] IOKit
  • [ ] Local Authentication Framework
  • [ ] Something not on this list

Base Information for this issue

  1. iOS System Version:iOS 11 beta

  2. Language:

    • [x] Objective-C
    • [x] Swift
  3. Prototype(是否是真机)

    • [x] YES
    • [ ] NO
  4. Test devices:

    • [ ] iPhone 7

    • [ ] iPhone 7 Plus

    • [ ] iPhone SE, iPhone 5s

    • [x] iPhone 6s, iPhone 6

    • [x] iPhone 6s Plus, iPhone 6 Plus

    • [ ] iPad Pro (10.5-inch), iPad Pro (12.9-inch) (2nd generation)

    • [ ] iPad (9.7-inch), iPad mini 4, iPad Air 2, iPad mini 3

    • [ ] iPad Pro (9.7‑inch)

    • [ ] iPad Pro (12.9‑inch)

    • [ ] iPad Air, iPad mini 2

    • [ ] iPod touch (6th generation)

  5. What kind of issue are you reporting?

    • [x] Q-A
    • [ ] Crash
    • [x] Bug

What steps can we take to reproduce this issue?

Steps to Reproduce:

使用 xib 创建 tableView 的 header 的时候出现缺少20的距离, 如图: 白色区域就是添加的 header (白色区域就是添加的 header 明显上边少了20 point) 效果图 (效果图)

How to solve ?

Here is a Demo.

iOS_11Test.zip

Same questions on Stack OverFlow

no same questions

HolmesZhao avatar Jun 07 '17 02:06 HolmesZhao

降级到iOS10.3.2无法使用备忘录,播客等app。

qimuya3 avatar Jun 08 '17 05:06 qimuya3

我reveal看了一下,添加在控制器的View的第一层视图(如tableView或者scrollView),它的frame和bounds不一样,如(frame:0,0,w,h;bounds:0,-20,w,h),目前预备最简单粗暴方案是设置inset 将top设置为-20,再查看frame和bounds是一样的(0,0,w,h)。

relaxstis avatar Jun 08 '17 10:06 relaxstis

This Problem is arises on iOS11

relaxstis avatar Jun 08 '17 11:06 relaxstis

interesting

lovemo avatar Jun 12 '17 04:06 lovemo

try contentInsetAdjustmentBehavior

yam-liu avatar Jun 23 '17 05:06 yam-liu

我也遇到了,我滑动 tableView 的时候改变headerView 的上面背景图片的 frame,但是顶部会有问题。

xhp281 avatar Aug 01 '17 02:08 xhp281

Could someone please explain how this issue was solved?

gregorpichler avatar Aug 21 '17 10:08 gregorpichler

This should answer your question http://www.jianshu.com/p/efbc8619d56b

samifei avatar Sep 18 '17 07:09 samifei