lexrus / LTMorphingLabel

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

IB Designables (Crash) #81

Closed jsmarklee closed 7 years ago

jsmarklee commented 7 years ago

Hi. It crashes when used in a storyboard.

Application Specific Information: CoreSimulator 375.20 - Device: IBSimDeviceTypeiPad2x - Runtime: iOS 10.3 (14E269) - DeviceType: IBSimDeviceTypeiPad2x fatal error: unexpectedly found nil while unwrapping an Optional value

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libswiftCore.dylib 0x000000011309a030 _TTSfq4n_n_d_d_n___TFs18_fatalErrorMessageFTVs12StaticStringS_4fileS_4lineSu5flagsVs6UInt32_Os5Never + 96 1 org.cocoapods.LTMorphingLabel 0x0000000112eea4c0 _TFC15LTMorphingLabel15LTMorphingLabel17limboOfCharactersfT_GSaVS16LTCharacterLimbo + 2512 (LTMorphingLabel.swift:408) 2 org.cocoapods.LTMorphingLabel 0x0000000112eeb9e4 _TFC15LTMorphingLabel15LTMorphingLabel8drawTextfT2inVSC6CGRectT + 244 (LTMorphingLabel.swift:466) 3 org.cocoapods.LTMorphingLabel 0x0000000112eecba5 _TToFC15LTMorphingLabel15LTMorphingLabel8drawTextfT2inVSC6CGRectT + 117

and the code is

    for (i, character) in (text!).characters.enumerated() {
jsmarklee commented 7 years ago

Oh and I don't think the pod is updated with the newest files yet. Please update it. Thank you for your time. 👍

jsmarklee commented 7 years ago

It works fine if a UILabel is added and its class is changed to LTMorphingLabel. Adding a UIView and changing its class to LTMorphingLabel was the problem. Thank you anyways! :)

lexrus commented 7 years ago

Sorry for the lack of CocoaPods update. I've just updated it to the HEAD. Please try again. Thanks.