0

I'm using cocoaAsyncSocket when i click on a button in my tableViewController to fetch the dat I want in the function didReadData to call reloadData of my tableView. how should get the reference of my tableView ? please tell me, if i should use appDelegate, singletons or simply send it as a parameter. or if my design all together is wrong. Thanks

Dany Y
  • 6,833
  • 6
  • 46
  • 83

1 Answers1

3

I would consider having your socket class send a NSNotification which the table view controller listens to.

Ole Begemann
  • 135,006
  • 31
  • 278
  • 256
  • thank you, this is exactly what i want. If it helps anyone here's how to use it [link]http://stackoverflow.com/questions/2191594/how-to-send-and-receive-message-through-nsnotificationcenter-in-objective-c – Dany Y Sep 26 '11 at 08:04