In my project I had created a custom layout for UICollectionView
. In that layout, vertical scrolling is NOT possible, only horizontal scrolling is possible.
If that UIViewController
is the only thing in the storyboard
, layout is working perfectly, ie, there is no vertical scrolling, only horizontal scrolling is possible.
But if you add UINavigationController
to storyboard
, layout fails in iOS 7 (tested in simulator and device). Then vertical scrolling is ENABLED. You can scroll a little amount, may be 20 or 30 points.
But for iOS 6, layout is working perfectly with and without UINavigationController
.(tested in iPhone).
Please help.
Thanks,
SOLUTION
I found solution to this.
In iOS 7, some inset was adding automatically to UICollectionView. So to fix it, add following code to ViewController self.automaticallyAdjustsScrollViewInsets = NO;
I found solution from https://stackoverflow.com/a/18989755/3117930
Hope this is helpful to someone Thanks,