I am using JSQMessagesViewController in swift with Xcode 6.3 Any one know about this error? how to solve this?
Asked
Active
Viewed 235 times
0
-
When I am removing these func or rename this, this error will occur 'ChatMessagesViewController' does not conform to protocol 'JSQMessagesCollectionViewDataSource' – Muhammad Raza Jul 01 '15 at 05:50
-
did you try replacing `String` with `NSString` in return type of these functions? – S1LENT WARRIOR Jul 01 '15 at 06:32
-
yes, still same error – Muhammad Raza Jul 01 '15 at 06:34
2 Answers
0
Declare this as a Type function by using class func
as such:
class func parseClassName() -> String {
return "Dan"
}

Kyle H
- 921
- 1
- 8
- 20
0
I think you should assign the values of both senderId and senderDisplayName in the viewDidLoad(), instead of methods.
override func viewDidLoad() {
super.viewDidLoad()
self.senderId = "YOUR_SENDER_ID"
self.senderDisplayName = "YOUR_DISPLAY_NAME"
}

Grace Huang
- 5,355
- 5
- 30
- 52