Adjusting the width of the UICollectionView

I am using ViewDeck to create a slide menu and would like to shorten the width of my CollectionView, which functions as a menu. I can't seem to find any delegation methods.

I am using storyboards and this is my problem:

enter image description here

Perhaps some setting is in use ?:

  • (UIEdgeInsets) collectionView: (UICollectionView) collectionView layout: (UICollectionViewLayout) collectionViewLayout insetForSectionAtIndex: (NSInteger) section
+3


source to share


2 answers


There's IISideController

a ViewDeck in there. He knows about the viewdeck and is made specifically for this scenario. It will resize the rendered view of the viewcontroller to the size of the ledge of the viewdeck (or user-specified size).



+1


source


I'll leave this because I was having trouble finding the answer, but throwing it in my subclass UICollectionViewController

viewDidLoad

did the trick:

self.collectionView.frame = CGRectMake(0, 0, 268, self.view.frame.size.height);



Where 268 = screen width (320) is the width of my menu (52).

-1


source







All Articles