             
             strongSelf.searchedContacts = strongSelf.contacts
             //            weak var weakSelf = self
-            DispatchQueue.main.async{
+            DispatchQueue.main.async {
                 strongSelf.loadingView.isHidden = true
                 strongSelf.activityIndicatorView.stopAnimating()
                 strongSelf.tblView.reloadData()

    fileprivate static func getVisibleViewControllerFrom(_ vc: UIViewController?) -> UIViewController? {
        if let nc = vc as? UINavigationController {
            return UIWindow.getVisibleViewControllerFrom(nc.visibleViewController)
        } else if let tc = vc as? UITabBarController {
            return UIWindow.getVisibleViewControllerFrom(tc.selectedViewController)
        } else {
            if let pvc = vc?.presentedViewController {
                return UIWindow.getVisibleViewControllerFrom(pvc)
            } else {
                return vc
            }
        }
    }
}


fileprivate class ContactCell: UITableViewCell {
    
    let checkMarkImageView = UIImageView(frame: CGRect(x: 8, y: 12, width: 22, height: 22))
    let nameLabel = UILabel(frame: CGRect(x: 45, y: 6, width: UIScreen.main.bounds.size.width-45-8, height: 18))
    let mobileLable = UILabel(frame: CGRect(x: 45, y: 24, width: UIScreen.main.bounds.width-45-8, height: 15))
    
    func initialize(withCheckMarkImage: UIImage) {
        super.awakeFromNib()
        
        checkMarkImageView.image = withCheckMarkImage
        checkMarkImageView.adjustImage()
        self.addSubview(checkMarkImageView)
        
        nameLabel.textColor = UIColor.black
        nameLabel.font = UIFont.systemFont(ofSize: 15)
