私は映画について簡単な教育アプリケーションを作成しようとしています。私はムービーフレームの水平スクロールを作成する必要があります。UITableView内のUICollectionViewCellサイズを自動サイズ調整する
私はそのためのコレクションビューを作成:この問題を解決する方法
:私は(例えばiPhone 6Sプラス)別のターゲットのためにそれを構築する場合
をしかし、私はこれを持っていますか?
マイシーンコントローラコード(スウィフト3):
public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return 4
}
public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "Cell", for: indexPath)
cell.backgroundColor = UIColor.black
// Configure the cell
return cell
}
override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableViewAutomaticDimension
}
問題点は何ですか? :) –
私は、コレクションビューのすべてのスペースを取ったセルを、画面の片面から別の面に移動したい。 – IlyaGutnikov