
안녕하세요. 오늘은 간단한 내용으로 작성해볼까합니다. 혹시 UICollectionView 를 사용하다가 Cell 사이즈가 안 바뀐적 있나요? 일반적으로 Cell 사이즈를 지정할때 아래 함수를 많이 쓰게 됩니다. (sizeForItemAt) func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { let width = collectionView.frame.width let itemsPerRow: CGFloat = 2// 각 렬당 2개 let widthPadding = 8 * (items..
iOS개발/Swift 기본
2023. 9. 8. 18:59