Closed shakked closed 7 years ago
+1
Seems like the problem stems from the fact that Swift 3 now treats all explicitly unwrapped optional types as Optional<T>
. The following is a quick fix for the problem.
cell.rightButtons = [endStory!]
The alternative would be to modify the MGSwipeButton
constructor so that it returns the Objective-C equivalent of MGSwipeButton
and notMGSwipeButton?
.
I'm going to improve the ObjC annotations for Swift and add a full Swift sample
I've pushed 1.5.6 version with Swift interoperation improvements. The swift 3.0 sample is ready too ;)
https://github.com/MortimerGoro/MGSwipeTableCell/tree/master/demo/MailAppDemoSwift
Once I updated my app to Swift 3.0, I started experiencing this crash. Here is the code where I set the
MGSwipeButton