3

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
4

2 回答 2

1

ViewDeck 中有一个IISideController。它了解 viewdeck,并且是专门为这种情况而设计的。它会将包含的 viewcontroller 视图的大小调整为 viewdeck 窗台的大小(或用户指定的大小)。

于 2013-03-07T08:12:10.460 回答
-1

我会留下这个,因为我很难找到答案,但是把它扔到我的UICollectionViewController子类viewDidLoad中就可以了:

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

其中 268 = 屏幕宽度 (320) - 我的菜单栏的宽度 (52)。

于 2013-02-10T21:00:41.450 回答