前提・実現したいこと
collectionviewを用いてカレンダーを作成しようとしています。
cell同士の間隔を0にしたいのですがうまくいきません。
発生している問題・エラーメッセージ
cell同士の間隔が0になりません。
該当のソースコード
swift
1//cellのサイズの設定 2extension ViewController: UICollectionViewDelegateFlowLayout { 3 4 func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { 5 return CGSize(width: view.frame.width / 7.0, height: view.frame.width / 7.0 + 5.0) 6 } 7 func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { 8 return UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) 9 } 10}
補足
(参考URL)
初心者なりに調べて書いてみたのですが上手くいきません。。
初めての質問なので足りない部分などあったら教えてください。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。