         if (error == nil)
         {
             self.arrContacts = contacts
-            self.tableView.reloadData()
+            dispatch_async(dispatch_get_main_queue(), {
+                // code here
+                self.tableView.reloadData()
+            })
+
         }
         
     })

            break
            
        }
    }
    
  }
    

    if contactsStore == nil {
        //ContactStore is control for accessing the Contacts
        contactsStore = CNContactStore()
    }
        let error = NSError(domain: "EPContactPickerErrorDomain", code: 1, userInfo: [ NSLocalizedDescriptionKey: "No Contacts Access"])
        
        switch CNContactStore.authorizationStatusForEntityType(CNEntityType.Contacts)
