
CGRect bounds = [self.collectionVIEw bounds];[self.collectionVIEw setBounds:CGRectMake(bounds.origin.x,bounds.origin.y,bounds.size.wIDth,bounds.size.height - 100)];
….
CGRect frame = [self.collectionVIEw frame];[self.collectionVIEw setFrame:CGRectMake(frame.origin.x,frame.origin.y,frame.size.wIDth,frame.size.height - 100)];
….
CGRect frame = self.collectionVIEw.frame;frame.size.height -= 100;self.collectionVIEw.frame = frame;
….
self.collectionVIEw.clipsToBounds = YES; self.collectionVIEw.autoresizingMask = UIVIEwautoresizingFlexibleHeight;解决方法 如果您使用Interface Builder进行UICollectionVIEw初始化,请在创建CollectionVIEw的xib文件中的file Inspector中关闭“Use autolayout”.然后,您可以使用setFrame或setBounds方法更改高度. 总结
以上是内存溢出为你收集整理的xcode – 调整UICollectionView高度全部内容,希望文章能够帮你解决xcode – 调整UICollectionView高度所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)