We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I implemented it easily on iOS, but the code doesn't work for mac. Am I doing something wrong or is it not supported yet?
Here's my code:
func collectionView(_ collectionView: UICollectionView, editActionsForItemAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> [SwipeAction]? { guard orientation == .left else { return nil } let item = fetchedResultsController.object(at: indexPath) let unreadAction = SwipeAction(style: .default, title: item.isUnread ? "Read" : "Unread") { action, indexPath in item.isUnread = !item.isUnread } unreadAction.backgroundColor = .clear unreadAction.textColor = .bookmark01 unreadAction.image = item.isUnread ? UIImage(named: "read") : UIImage(named: "unread") return [unreadAction] } func collectionView(_ collectionView: UICollectionView, editActionsOptionsForItemAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> SwipeOptions { var options = SwipeOptions() options.expansionStyle = .selection options.transitionStyle = .border options.backgroundColor = .clear return options }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I implemented it easily on iOS, but the code doesn't work for mac. Am I doing something wrong or is it not supported yet?
Here's my code:
The text was updated successfully, but these errors were encountered: