ra1028 / RAReorderableLayout

A UICollectionView layout whitch can move item with drag and drop.
MIT License
867 stars 140 forks source link

Fix Objective-C compatebility #48

Open ikorich opened 7 years ago

ikorich commented 7 years ago

RAReorderableLayoutDataSource and RAReorderableLayoutDelegate are hidden for Objective-C. need add

@objc

to protocols

ra1028 commented 7 years ago

@iKorich Could you remove default behavior of RAReorderableLayoutDelegate/RAReorderableLayoutDatasource from these extensions?

ikorich commented 7 years ago

Hi @ra1028

I don't want remove it, because thats not for obj-c fix,

Also I can fix some issues, just mark it for me

ra1028 commented 7 years ago

But, it's not require in @objc optional function.

ricsantos commented 6 years ago

@ra1028 also any chance of getting this PR merged. It's needed for ObjC compatibility.

ricsantos commented 6 years ago

After further investigation, I'm not convinced that these protocol methods should be marked as optional.

From my testing in an ObjC project using this pod as a dependency, with the Swift 3.2 compiler, if the methods are marked optional then the default implementation provided by the protocol extensions is called instead of the ObjC implementation.