如何防止键盘调整集合视图swift 3

时间:2016-09-27 02:25:37

标签: swift uiview uicollectionview uisearchcontroller

正如标题所说,每当我点击搜索栏或任何文本字段时,键盘都会出现并调整视图大小。我在另一个集合视图中有一个集合视图,所以我不介意调整大小的集合视图是内部的,但它调整外部集合视图的大小。我几乎尝试了所有我能想到的东西。所以,如果有人有任何建议,我将不胜感激。

我已经尝试过补充视图,uisearchcontroller ...我不知道还能做什么...就像这个有一个监听器来调整底部约束。这是我得到的错误方法,很多次(每次出现keybarod时都是20次)

the behavior of the UICollectionViewFlowLayout is not defined because:
2016-09-27 22:27:04.726 APP[1446:734553] the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.
2016-09-27 22:27:04.727 APP[1446:734553] The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x14c6efa60>, and it is attached to <UICollectionView: 0x14d03d600; frame = (0 50; 414 622); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x14c5a2a80>; layer = <CALayer: 0x14c5bdf40>; contentOffset: {414, 0}; contentSize: {1242, 622}> collection view layout: <UICollectionViewFlowLayout: 0x14c6efa60>.
2016-09-27 22:27:04.727 APP[1446:734553] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.

0 个答案:

没有答案