为什么从未调用过 sizeForItemAtIndexPath?

Why is sizeForItemAtIndexPath never called?

在我的自定义视图控制器中定义如下:

class Wall : UIViewController, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, WallLayoutDelegate {

    override func viewDidLoad() {
        super.viewDidLoad()

        let layout = WallLayout()
        layout.delegate = self


        let collectionView = UICollectionView(frame: view.bounds, collectionViewLayout: layout)
        collectionView.registerClass(WallCell.self, forCellWithReuseIdentifier: Wall.reuseIdentifier)
        collectionView.delegate = self
        collectionView.dataSource = self
        collectionView.backgroundColor = UIColor.blackColor()

        self.view.addSubview(collectionView)

        self.collectionView = collectionView
   }
   // CODE

   func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
      return CGSizeMake(50, 100)
   }

}    

从未调用函数 sizeForItemAtIndexPath。怎么来的?

我发现是因为我用UICollectionViewDelegateFlowLayout时layout是我自己的,不能被collection view推导出来