Added checking size class to set itemsize in layout