Include an extension for a class only if iOS11 is available
I am trying to extend a class written in Obj-C and include an extension written in Swift that makes it conform to the UIDropInteractionDelegate , like so: @available(iOS 11.0, *) extension NoteEditViewController: UIDropInteractionDelegate { @available(iOS 11.0, *) public func dropInteraction(_ interaction: UIDropInteraction, sessionDidUpdate session: UIDropSession) -> UIDropProposal { let operation: UIDropOperation if session.localDragSession == nil { operation = .forbidden } else { // If a local drag session exists, we only want to move an // existing item in the pin board to a different