框架“集合视图”将在运行时Swift3 iOS10故事板
问题描述:
是不同的,当我在我的项目中使用“集合视图”,我碰到一个问题:框架“集合视图”将在运行时Swift3 iOS10故事板
现在它走了它使用的是在奥兰治RECT:
框架 “集合视图” 会在运行时不同。我不知道我做错了什么。我搜查了整个互联网,什么都没找到。
因此,这里有一个'解决方案',就像屏幕截图显示的那样,您只需检查标题然后对其进行检查,问题就会消失,尽管如此,我仍然不知道导致这种情况的原因。
检查的内容UIView的页眉和decheck它:
答
进行设计编程。 等作为
func collectionView(_ collectionView: UICollectionView,
layout collectionViewLayout: UICollectionViewLayout,
sizeForItemAt indexPath: IndexPath) -> CGSize {
print("widthhh",width*0.41);
if(width*0.41 < 135.0)
{
return CGSize(width: (width * 0.41), height:(width * 0.41)+15.0);
}
else{
return CGSize(width: (width * 0.41), height:(width * 0.41));
}
}
答
这是Interface Builder的错误。
类似于IB problems
我很享受这个bug在Xcode 8.2.1
那有什么?我7年做的Xcode,Interface Builder中有很多虫子在每一个版本。我认为这是苹果风格。顺便说一句,Xcode也有很多错误。
只是忽略。
其实我无法理解你的问题。这里有什么问题? –
你应该把它放在社区wiki中。真的有帮助,但 – viz