lexrus / LTMorphingLabel

[EXPERIMENTAL] Graceful morphing effects for UILabel written in Swift.
MIT License
8.07k stars 782 forks source link

Swift 3 Fall Animation Crash #68

Closed wenxin3262 closed 8 years ago

wenxin3262 commented 8 years ago

Tried swift3 branch demo, after click fall, the app crashes. Error:

2016-09-23 15:34:23.819 LTMorphingLabelDemo[91858:5940775] -[_SwiftValue set]: unrecognized selector sent to instance 0x618000056230
2016-09-23 15:34:23.824 LTMorphingLabelDemo[91858:5940775] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_SwiftValue set]: unrecognized selector sent to instance 0x618000056230'

Caused by line 137 in LTMorphingLabel+Fall.swift.

                let s = String(limbo.char)
                s.draw(in: charRect, withAttributes: [
                    NSFontAttributeName: self.font.withSize(limbo.size),
                    NSForegroundColorAttributeName: charColor
                    ])

I could not fix it so I just comment these lines out and it doesn't crash.

lexrus commented 8 years ago

It's fixed. Thank you.