title: 'DepartmentDataDelegate' cannot be constructed because it has no accessible initializers
body: <p>I am using Protocol and Delegates for saving api data into delegate method and in another class, fetching it. But in second class, when i declared this property. It shows an error message.</p>
  
  <blockquote>
    <p>'DepartmentDataDelegate' cannot be constructed because it has no
    accessible initializers</p>
  </blockquote>
  
  <p><strong>Class A :</strong>
  Add protocol for saving api data into the delegate method.</p>
  
  <pre><code>protocol DepartmentDataDelegate {
      func showDepttData(departments: [String : Any])
  }
  
  var delegate: DepartmentDataDelegate?
  </code></pre>
  
  <p>Stored api data into protocol method</p>
  
  <pre><code>do {
                  //create json object from data
                  if let json = try JSONSerialization.jsonObject(with: data, options: .mutableContainers) as? [String: [Any]] {
                      //print("POST Method :\(json)")
  
  
                      DispatchQueue.main.async {
  
                          for eachDepartment in json["departments"]!
                          {
                              let eachData = eachDepartment as! [String: Any]
  
                              self.delegate?.showDepttData(departments: eachData)
                          }
                          self.tableView.reloadData()
                      }
  
                      // handle json...
                  }
              } catch let error {
                  print(error.localizedDescription)
  }
  </code></pre>
  
  <p><strong>Class B :</strong> 
  This class is fetching the department data and print here.</p>
  
  <pre><code>class ShowEmpVC: UIViewController, DepartmentDataDelegate {
  
      //Department Data Delegate
      var depttDelegate = DepartmentDataDelegate()
  
      var depttData = [String : Any]()
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          depttDelegate = self
          print("Departmens  are  :   \(depttData)")
      }
  }
  </code></pre>