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

How to convert a byte to a String in Swift?
Set delegate of UIGestureRecorgniser to parent
Going from one ViewController to another ViewController and updating
Setting Text View to be Int rather than String? Swift
Why I am getting ERROR: Type 'Any' has no subscript members when trying to use ELCimagepickercontroller
UIActivityViewController using multiple arrays
how to call Swift closure callback
Realm Notification is not triggered when NSPredicate changes
Parse can't retrieve CurrentUser's array objects
Use of unresolved type MutableProperty
How to have label text change to message after user types in textfield?
RxSwift/RxCocoa: Code Completion barely working
Completion block never called at end of SKAction sequence of groups
What is the best way to zoom and deplace nodes?
How to handle PUT HTTP request in Vapor?
Getting HTTP headers with URLSessionDownloadDelegate

Categories

HOME
jsviews
scipy
angular2-routing
fparsec
reportportal
d
extract
hana
recyclerview
dataframe
xcode8.3
wicket
intellij-plugin
activesync
simple-injector
jacoco
aspell
dendrogram
aptana
ng-show
linq-to-sql
ejbca
os161
servicemix
remove-method
jenkins-job-dsl
continuous-deployment
metis
codelite
widevine
i3
hana-studio
superagent
pygooglechart
jackson-dataformat-csv
ocs
npm-shrinkwrap
bigcartel
vmd
parent
linq-to-entities
flex4.5
wcf-security
intellilock
intellij-idea-2016
jdbi
rich-text-editor
data-integration
dimple.js
livefyre
cdk
hpcc
adler32
ingres
qos
createobject
svn-merge
iostat
push-diffusion
search-regex
concur
yoothemes
insertion-sort
lmfit
kendo-menu
fabric-twitter
wif
calibration
gulp-livereload
swift2.1
epl
jazz
c++-actor-framework
grunt-contrib-concat
hidden-field
funq
eclipse-classpath
cppdepend
ssms-addin
android-looper
sgml
db4o
baucis
layered
installshield-2011
haskell-platform
grunt-contrib-compass
shortcuts
sequelpro
pstree
hibernate3
point-sprites
maven-ant-tasks
nssavepanel
electronic-signature
paintcomponent
scalaxb
adsl
adobe-contribute
getresource
hadoop-plugins
windows-controls
nt4

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