1.Added @objc before
public protocol RAReorderableLayoutDelegate: UICollectionViewDelegateFlowLayout
and
public protocol RAReorderableLayoutDataSource: UICollectionViewDataSource
the code will be:
@objc public protocol RAReorderableLayoutDelegate: UICollectionViewDelegateFlowLayout
@objc public protocol RAReorderableLayoutDataSource: UICollectionViewDataSource
2.setup your collection view delegate and datasource(Use RAReorderableLayout as its layout)
For version 0.6.1 with Swift 3.0
1.Added @objc before
public protocol RAReorderableLayoutDelegate: UICollectionViewDelegateFlowLayout
andpublic protocol RAReorderableLayoutDataSource: UICollectionViewDataSource
the code will be:
2.setup your collection view delegate and datasource(Use RAReorderableLayout as its layout)
You don't need to do something like
layout.delegate = self
at this version3.Put all the delegate & datasource method into your view controller
Datasource:
Delegate:
Then do what you need in all these methods. P.S. some method you don't need could be just empty