You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am listening event in Viewdidload method.each time view did load get called it adds a listener and receiving response incremented by 1.Please tell me its fixture
here is my code
override func viewDidLoad() {
SocketHelper.sharedHelper().theSocket().emit("EventName", args:[jsonInput])
self.listenEventResponse()
}
func listenEventResponse(){
SocketHelper.sharedHelper().theSocket().on("EventName") { (dataArr:[AnyObject]!) -> Void in
let jsonDictionary = (dataArr as NSArray).objectAtIndex(0)
print(jsonDictionary)
// Here i get printed output multiple times each time added once more
}
}
The text was updated successfully, but these errors were encountered:
I am listening event in Viewdidload method.each time view did load get called it adds a listener and receiving response incremented by 1.Please tell me its fixture
here is my code
override func viewDidLoad() {
SocketHelper.sharedHelper().theSocket().emit("EventName", args:[jsonInput])
self.listenEventResponse()
}
func listenEventResponse(){
SocketHelper.sharedHelper().theSocket().on("EventName") { (dataArr:[AnyObject]!) -> Void in
let jsonDictionary = (dataArr as NSArray).objectAtIndex(0)
print(jsonDictionary)
// Here i get printed output multiple times each time added once more
}
}
The text was updated successfully, but these errors were encountered: