3
votes

I'm using ViewDeck to make 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 delegate methods to do so though.

I'm using Storyboards, and this is my issue:

enter image description here

Perhaps some sort of setup using? :

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

2 Answers

1
votes

There's an IISideController in ViewDeck. It knows about the viewdeck and is made specifically for this scenario. It will adjust the size of the contained viewcontroller's view to the size of the ledge of the viewdeck (or to a user specified size).

-1
votes

I'll leave this up because I had trouble finding the answer, but throwing this in my UICollectionViewController subclass' viewDidLoad did the trick:

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

Where 268 = screen width (320) - width of my menu ledge (52).