Set collection view flow layout in objective c

[collectionDetails registerNib:[UINib nibWithNibName:@"HotelFacilityCell" bundle:nil] forCellWithReuseIdentifier:@"HotelFacilityCell"];
    UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
    [flowLayout setMinimumInteritemSpacing:0.0f];
    [flowLayout setMinimumLineSpacing:0.0f];
    [flowLayout setScrollDirection:UICollectionViewScrollDirectionHorizontal];
    [collectionDetails setCollectionViewLayout:flowLayout];