You can fully configure your collection view to handle number of items in a row Just define number of items in collectionview and all is done for you...!!!!
This control is used to fully customize collection view with dynamic number of items in a row. It has two custom constructor methods used for initializing collection view either from array of images or with all Images of a directory.
Note: If you wnt to init with directory path then you will have to add images first to the directory and you can change the directory name as required in code.