MortimerGoro / MGSwipeTableCell

An easy to use UITableViewCell subclass that allows to display swippable buttons with a variety of transitions.
MIT License
6.96k stars 1.07k forks source link

`-[_SwiftValue bounds]: unrecognized selector sent to instance` Crash #229

Closed wsamuels closed 8 years ago

wsamuels commented 8 years ago

This crash started happening once I updated my app to Swift 3.0, here the code where I implement MGSwipeTableCell:

            let endStory = MGSwipeButton(title: "  End   ", backgroundColor: Colors.crewRedColor, callback: { (cell) -> Bool in
                self.activityIndicator.startAnimation()
                self.querier.endStory(story, completion: { (succeeded, error, story) -> (Void) in
                    self.activityIndicator.stopAnimation()
                    guard let story = story , succeeded else {
                        (error ?? .unknownError).showAlert(self)
                        return
                    }
                    inMainQueue {
                        self.viewsListItems = self.viewsListItems.filter({ $0.story != story })
                    }
                })
                Analytics.log(Events.Story_Ended)
                return true
            })

            cell.rightButtons = [endStory]