SimpleChat icon indicating copy to clipboard operation
SimpleChat copied to clipboard

Crashing when trying to load

Open cesarmtz93 opened this issue 6 years ago • 1 comments

Getting this error @loganwright, @little2s haven't figure out the why on this!

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'NSLayoutConstraint for <SimpleChat.LGChatInput: 0x7fd0e67008f0; frame = (0 0; 0 0); layer = <CALayer: 0x6000004d2a40>>: Constraint items must each be a view or layout guide.

update triggered on this line

self.bottomChatInputConstraint = NSLayoutConstraint(item: chatInput, attribute: .bottom, relatedBy: .equal, toItem: self.view.safeAreaLayoutGuide.bottomAnchor, attribute: .top, multiplier: 1.0, constant: 0)

cesarmtz93 avatar Mar 21 '19 20:03 cesarmtz93

I changed the

self.view.safeAreaLayoutGuide.bottomAnchor

to only

self.view.safeAreaLayoutGuide

self.bottomChatInputConstraint = NSLayoutConstraint(item: chatInput, attribute: .bottom, relatedBy: .equal, toItem: self.view.safeAreaLayoutGuide, attribute: .top, multiplier: 1.0, constant: 0)

and it no longer crashed the next problem that I encountered is that it's not rendering the messages or toolbar

cesarmtz93 avatar Mar 26 '19 09:03 cesarmtz93