swift


SwiftValue: ctFontRef unrecognized selector sent to instance


I am doing an chatting app by using Quick blox. I am not an expecting in code. when i run the app. The app gets crashed. I got an error. Chatting Message[1806:27316] -[_SwiftValue ctFontRef]: unrecognized selector sent to instance 0x600000253020
2017-05-16 10:23:38.982 Chatting Message[1806:27316] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_SwiftValue ctFontRef]: unrecognized selector sent to instance 0x600000253020'
override func collectionView(_ collectionView: QMChatCollectionView, dynamicSizeAt indexPath: IndexPath, maxWidth: CGFloat) -> CGSize
{
let item: QBChatMessage? = chatDataSource.message(for: indexPath)
let viewClass: AnyClass = self.viewClass(forItem: item!)
var size: CGSize?
if viewClass == QMChatAttachmentIncomingCell.self || viewClass == QMChatAttachmentOutgoingCell.self
{
size = CGSize(width: CGFloat(min(200, maxWidth)), height: CGFloat(200))
}
else
{
// let attributedString: NSAttributedString? = self.attributedString(forItem: item!)
// size = TTTAttributedLabel.sizeThatFitsAttributedString(attributedString, withConstraints: CGSize(width: maxWidth, height: CGFloat(MAXFLOAT)), limitedToNumberOfLines: 0)
}
size = CGSize(width: CGFloat(min(200, maxWidth)), height: CGFloat(200))
return size!
}
override func collectionView(_ collectionView: QMChatCollectionView, minWidthAt indexPath: IndexPath) -> CGFloat
{
let item: QBChatMessage? = chatDataSource.message(for: indexPath)
var size: CGSize?
size = CGSize(width: CGFloat(1000), height: CGFloat(10000))
if item != nil
{
let attributedString: NSAttributedString? = item?.senderID == senderID ? bottomLabelAttributedString(forItem: item!) : topLabelAttributedString(forItem: item!)
size = TTTAttributedLabel.sizeThatFitsAttributedString(attributedString, withConstraints: CGSize(width: CGFloat(1000), height: CGFloat(10000)), limitedToNumberOfLines: 1)
}
return size!.width
}
override func collectionView(_ collectionView: QMChatCollectionView, layoutModelAt indexPath: IndexPath) -> QMChatCellLayoutModel
{
var layoutModel: QMChatCellLayoutModel = super.collectionView(collectionView, layoutModelAt: indexPath)
let item: QBChatMessage? = chatDataSource.message(for: indexPath)
layoutModel.avatarSize = CGSize(width: CGFloat(0.0), height: CGFloat(0.0))
if item != nil
{
let topLabelString: NSAttributedString? = topLabelAttributedString(forItem: item!)
let size1 = TTTAttributedLabel.sizeThatFitsAttributedString(topLabelString, withConstraints: CGSize(width: collectionView.frame.width, height: CGFloat.greatestFiniteMagnitude), limitedToNumberOfLines: 1)
layoutModel.topLabelHeight = size.height
}
return layoutModel
}

Related Links

Thread 1 SIGABRT Error XCODE 8.3 [duplicate]
CATransform3DRotate applied to layer doesnt work
Swift - How To Save Image Button?
Swift is not setting a value in return statement
Swift - how to reduce matrix
How to full screen layout to a view in Swift?
Swift and Google maps: How to change color of marker info view without remaking it
How do I add a back button after customising the toolbar with other buttons?
How to make video or record screen with specific frame of UIImageVew Transitions effects with set of images iOS
No Such Module 'Google Mobile Ads' Error
Swift 3 generics / associated types limitations with protocols
Will there be some pre-change notification ?
get details of person from address book swift macOS
Thread error with MKMapView and UIImagePickerController
Swift: Instance member in property initializer of lazy property [duplicate]
How can I update an assignment in Swift?

Categories

HOME
makefile
pug
meshlab
itext
ocaml
boost-thread
jasmine
laravel-4
slim-3
facebook-javascript-sdk
uiactivityviewcontroller
uiscrollview
dlib
mule-studio
phpbb
primes
google-maps-android-api-2
avplayeritem
richfaces
restfb
python-textprocessing
jenkins-job-dsl
positioning
superscript
construct-2
polymorphism
division
service-locator
wfp
npm-publish
redhat-datavirt
s3cmd
infusionsoft
socketscan
dart-pub
web-development-server
ical-dotnet
shutdown
tcserver
scd
python-hypothesis
adler32
ingres
shinyjs
coremidi
backstop.js
radians
uiprogressview
dojox.charting
brython
proxygen
anti-cheat
handlebars.java
android-recyclerview
direct3d12
intellitest
document-oriented-db
futuretask
apigee-baas
built-in
integral
calibration
harp
sparse-file
pylearn
virus
musl
consensus
ctrlp
jquery-autocomplete
log4cplus
sid
eclipse-classpath
crystal-reports-10
db4o
gamepad
modeshape
driver-signing
image-zoom
grunt-contrib-compass
symphony-cms
pascals-triangle
hibernate3
supersized
wchar
querystringparameter
electronic-signature
adsl
nvelocity
oggvorbis
web-statistics
integer-promotion
nt4
gears

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App