Open yoonjason opened 1 year ago
hi
First I'll show you my code
import snapkit import Then import SkeletonView class BaseViewController: UIViewController { } class DoSomethingViewController: BaseViewController { private let testLabel: UILabel = .init() override func viewDidLoad() { super.viewDidLoad() setupViews() setupLayoutConstraints() } func setupViews() { testLabel.do { $0.text = "terminating with uncaught exception of type NSException" $0.textAlignment = .left $0.numberOfLines = 0 view.addSubview($0) } } func setupLayoutConstraints() { testLabel.snp.makeConstraints { $0.top.equalTo(imageButton).offset(20) $0.centerX.equalToSuperview() $0.leading.equalToSuperview().offset(10) $0.trailing.equalToSuperview().offset(-10) } } override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() testLabel.isSkeletonable = true testLabel.showSkeleton() } }
Is there a way to fix the app crashes with the following error?
-[UILabel setIsSkeletonable:]: unrecognized selector sent to instance 0x158708450
hi
First I'll show you my code
Is there a way to fix the app crashes with the following error?
-[UILabel setIsSkeletonable:]: unrecognized selector sent to instance 0x158708450