0
我CollectionView
在TableView
细胞: 细胞不适合在屏幕
约束的细胞在CollectionView
当我运行的应用程序F.E.在iPhone 5S我看到(电池不适合在屏幕上):
我知道重用,但如何显示从开始的绝细胞(适应屏幕)?
我CollectionView
在TableView
细胞: 细胞不适合在屏幕
约束的细胞在CollectionView
当我运行的应用程序F.E.在iPhone 5S我看到(电池不适合在屏幕上):
我知道重用,但如何显示从开始的绝细胞(适应屏幕)?
你需要reaload您的收藏观
在你TableViewCell Impleament方法
func draw(_ rect: CGRect)
{
// here you have to reaload your collectionView
super.draw(rect)
self.collectionView.realodData()
}
刷新你的TableCell通过调用它的drawRect方法
optional func tableView(_ tableView: UITableView,
willDisplay cell: UITableViewCell,
forRowAt indexPath: IndexPath)
{
cell.setNeedsDisplay()
}
我希望这会为你工作,
谢谢,它真的按我的意愿工作。大! –
这是否适合您?下面的答案? – Dhiru