我开始认为这可能是一个bug,因为包含文本字段、iMessage应用程序抽屉图标、心形图标和相机图标的标题栏似乎被截断的量与偏移量大致相同。
here is the code from github
contentInset 在您的 layout() 通话距离原始位置6像素。这就是为什么动画在动画完成后调整6像素。
contentInset
layout()
UIEdgeInsets() 在你的 呼叫内部 StickerCollectionVC
UIEdgeInsets()
StickerCollectionVC
self.collectionView?.contentInset = UIEdgeInsets( top: screenW * 0.1 - 6, left: screenW * 0.1, bottom: 20 + (screenW * 0.1), right: screenW * 0.1)