I used self.inset = UIEdgeInsetsMake(0.0, 25.0f, 0.0f, 25.0f);
and
}

Thanks in advance
@Shivaprasad2452 what UICollectionViewLayout subclass are you using?
I am using UICollectionViewFlowLayout
below is the code snippet
+1
EDIT:
I have a supplementary view, I added a top inset, the top inset was applied below the supplementary view, I'm guessing the inset is applied to the cell collection part of the collectionview
@Shivaprasad2452 @ninokierulf
Section insets are applied to contents only in UICollectionViewFlowLayout.
See Using the Flow Layout of the Apple official documentation for more details.

looks like its default behaviour of iOS.
thanks @flybrotherlixiang
then how do I apply insets to header view?
Most helpful comment
@Shivaprasad2452 @ninokierulf
Section insets are applied to contents only in
UICollectionViewFlowLayout.See Using the Flow Layout of the Apple official documentation for more details.