Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

Delete button not appearing #1784

Closed
rostopira opened this issue Aug 3, 2016 · 4 comments
Closed

Delete button not appearing #1784

rostopira opened this issue Aug 3, 2016 · 4 comments

Comments

@rostopira
Copy link

Bug report

Delete button not appearing

Steps to reproduce

override func collectionView(_ collectionView: UICollectionView, shouldShowMenuForItemAt indexPath: IndexPath) -> Bool {
        super.collectionView(collectionView, shouldShowMenuForItemAt: indexPath)
        return true
    }
    override func collectionView(_ collectionView: UICollectionView, canPerformAction action: Selector, forItemAt indexPath: IndexPath, withSender sender: AnyObject?) -> Bool {
        super.collectionView(collectionView, canPerformAction: action, forItemAt: indexPath, withSender: sender)
        switch action.description {
            case "delete:": return true//data.messages[indexPath.item].id == senderId()
            case "copy:":   return true
            default:        return false
        }
    }
    override func collectionView(_ collectionView: UICollectionView, performAction action: Selector, forItemAt indexPath: IndexPath, withSender sender: AnyObject?) {
        super.collectionView(collectionView, performAction: action, forItemAt: indexPath, withSender: sender)
        switch action.description {
            case "delete:": msgRef.child(data.messages[indexPath.item].fireKey).delete(nil)
            case "copy:":   UIPasteboard.general().string = data.messages[indexPath.item].message as String
            default:        return
        }
    }

Copy button appearing and works. And I checked, that code after case "delete:" is executing, but button isn't appearing

@rostopira
Copy link
Author

@jessesquires it's probably bug, not a question

@Lucashuang0802
Copy link
Collaborator

@rostopira should the library version be 7.3.4? Are you using the develop?

@rostopira
Copy link
Author

@Lucashuang0802 yes, I'm using develop branch

@jessesquires
Copy link
Owner

Thanks @rostopira -- we can't provide any support for those using develop.

This is an in-progress release and it changes/breaks frequently. We recommend that you use the latest official release instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants