Hi,I am doing collection view series now.Tutorials are very useful but I find customization of collection view cells to be confusing and is not clear like CGSize bit and let widthSize = (view.frame.size.width - 20) / 3 why we did that please guide me with some solution so that I can understand it more accurately. I really find the content and your efforts very helpful
That calculation is for when you need 3 columns of cells in your collection view. Since the screen size can vary depending on device, you take the width of the screen, which is view.frame.size.width, and divide it by 3 to get the size of each column. However, you also want 10 pixels of space between each column. Since you have 3 columns, youβll have two spaces between those 3 columns and so, 10 x 2 = 20 and thatβs the amount of space you take out before you the division to allow for the space between the columns.