I am in a strange situation . when i try to reload the tableview using reloadData()
it shows the following error . . .
fatal error: unexpectedly found nil while unwrapping an Optional value
Here is the web service method that retrieves output
func didRecieveOutput(results:NSArray) {
if results.count != 0
{
userOrders = results as! NSMutableArray
dispatch_async(dispatch_get_main_queue(), { () -> Void in
self.orderList.reloadData() })
}
}
Edit : I had checked my connection as well as delegate & datasource . It works fine with static data . But problem came when I called reloadData(). I had the same problem with static data as well as dynamic (data from server).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…