LabelSwitch icon indicating copy to clipboard operation
LabelSwitch copied to clipboard

IB Crash

Open ghost opened this issue 4 years ago • 4 comments

The Interface Builder crashes with the following error: Pods/LabelSwitch/LabelSwitch/Classes/LabelSwitch.swift: 63: 28: Fatal error: Use of unimplemented initializer 'init(frame:)' for class 'LabelSwitch.LabelSwitch'

I think the only thing required is to implement init(frame:). It could be as simple as this:

public override init(frame: CGRect) {
    self.init(center: .zero, leftConfig: .defaultLeft, rightConfig: .defaultRight)
}

ghost avatar Apr 16 '20 20:04 ghost

Thanks for you report, I will check it

Cookiezby avatar May 07 '20 02:05 Cookiezby

Would you please tell me more detail about how this will happen? cause I can not reappear this issue in my example project. @FreshSkyler Any information would be a lot of help.

Cookiezby avatar May 10 '20 05:05 Cookiezby

Sure! This Stack Overflow post describes the symptoms (it's a different library, but has the same problem). The accepted answer describes how to find the crash log, and this comment explains how to fix it.

ghost avatar May 11 '20 16:05 ghost

Cause I have update the lib, can you update to the newest version and check if this issue still exists.

Cookiezby avatar May 16 '20 13:05 Cookiezby