UICollectionViewDrop API broken in iOS 11 beta 4

The drop api for collection view seems to be broken in beta 4.


In previous betas the UICollectionViewDropCoordinator had an api to drop into a placeholder that would also create the placeholder:

func drop(_, toPlaceholderInsertedAt:, withReuseIdentifier:)


this api was dropped in beta 11 and instead there is an api:

func drop(_ dragItem: UIDragItem, to placeholder: UICollectionViewDropPlaceholder)


that requires a new class UICollectionViewDropPlaceholder but it's unclear how one would create such an object as it's init requires a reuse identifier and an index path, but get no reference to the collection view where this reuse identifier is registered.


I tried creating such a class thinking maybe the init has access to the active drop session and get a reference to the collection view through that, but the project fails to link yielding an undefined symbol: UICollectionViewDropPlaceholder, meaning this class isn't at all in the uikit framework.


So how is one supposed to do drag and drop in a collection view in beta 4?

There's a unfortunate issue with the declaration of the new UICollectionViewDropPlaceholder and UITableViewDropPlaceholder classes that were introduced in the iOS 11 beta 4 SDK that prevents them from being used in this seed. Please continue to use the Beta 3 SDK temporarily if you need to use drag & drop placeholders until the next seed is released (where this issue will be resolved). Apologies for the inconvenience!

Beta 5 is out, but this issue hasn't been corrected. The API looks identical to that of xcode beta 4 and still seems to be not usable.

Please try again with beta 5 or later, the issue is resolved with the new API (UICollectionViewDropPlaceholder and UITableViewDropPlaceholder). If you are having trouble with beta 5 or later, please file a bug report at https://bugreport.apple.com because you are almost certainly running into a different problem than the one that was fixed in beta 5.

UICollectionViewDrop API broken in iOS 11 beta 4
 
 
Q