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