I am using UICollectionView with horizontal paging enabled.
My collectionView frame is less than the screen size.
I used the following code :
myCollectionView.clipsToBounds=FALSE;
Still I am not able to see the views outside the bounds of my collectionView.
I am using custom UICollectionViewLayout
If the size of each page is greater or equal to your collectionView
's frame size, you will not be able to see the content outside the frame even clipToBounds
is disabled.
In order to save the memory, the cells in the collectionView
are reusable and will be removed if they are out of the frame (i.e. only shows the visible cells).
To recreate the effects like the one seen on the App Store:
Try to set the frame of the collectionView
as large as your collectionView
's superView
, and specify proper minimumLineSpacing
for your UICollectionViewFlowLayout
.
You may like to take a look at this post about targetContentOffsetForProposedContentOffset:withScrollingVelocity
which gives you controls to decide the contentOffset
of a given page.
I'm not sure but may be the problem when you init your collectionView it's initializing with the some default settings like clipToBounds. Try this method to layout subviews:
-(void)layoutSubviews{
[super layoutSubviews];
myCollectionView.clipsToBounds = FALSE;
}
Hope it works.