SimpleChat
SimpleChat copied to clipboard
Crashing when trying to load
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)
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