Представление сцены TableView, идет смещение ячеек


#1

Мужики столкнулся с проблемой у меня TableViewCell , сделал представление сцены TableViewCell.Сепараторы убрались, записал код автоматического расширения ячеек.Как в Уроке Ивана, сделал убрать UIView в Footer.Не фига, не сработало.Нашел где то 5 уроков и у других просмотрел в коде по разбирался.Не могу найти в чем допускаю ошибку.И еще не могу понять почему один подвид ячейки появился.Я указывал два.Очень буду благодарен за помощь. Прикрепляю скриншот .Может у кого то тоже такая ошибка была, сможет мне помочь.

import UIKit
import Parse

class DetailSoccerTableViewController: UIViewController,UITableViewDelegate,UITableViewDataSource  {

    @IBOutlet weak var imageSoccer: UIImageView!
    @IBOutlet weak var tableView: UITableView!
    
    
   
    
    var detailSoccer: Soccer!
    
    var selectedSoccer = [Soccer]()
    
    
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
       
        title = detailSoccer.detailTitleS
        
      
        tableView.estimatedRowHeight = 288
        tableView.rowHeight = UITableViewAutomaticDimension
        tableView.separatorStyle = .none
        tableView.delegate = self
        tableView.dataSource = self
        tableView.register(UINib(nibName:"SoccerTableViewCell",bundle:nil), forCellReuseIdentifier: "soccerCell")
        
        
        tableView.reloadData()
        loadMatchSoccer()
      
       
        // Do any additional setup after loading the view.
    }
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        
        self.navigationController!.navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default)
        self.navigationController?.navigationBar.shadowImage = UIImage()
        self.navigationController?.navigationBar.isTranslucent = true
        self.navigationController!.view.backgroundColor = UIColor.clear
        self.navigationController?.navigationBar.backgroundColor = UIColor.clear
        
        
    }
    
 
   
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    
    func numberOfSections(in tableView: UITableView) -> Int {
        return 1
    }

    
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
    
        return selectedSoccer.count
    }
    

    
    
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
             let soccerCell = tableView.dequeueReusableCell(withIdentifier: "soccerCell", for: indexPath) as! SoccerTableViewCell
        
        let selectedSoccerRow = selectedSoccer[indexPath.row]
        switch indexPath.row {
        case 0:
            soccerCell.titlePrognoz.text = "Описание:"
            soccerCell.textSoccer.text = selectedSoccerRow.textSoccer
            
        case 1:
            soccerCell.titlePrognoz.text = "Прогноз на матч:"
            soccerCell.textSoccer.text = selectedSoccerRow.detailPrognozS
        default:
            break
        }
        
        
        return soccerCell
        
    }
    
    
   
    
    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
        return UITableViewAutomaticDimension
    }
    
    func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
        return UITableViewAutomaticDimension
    }
    
    
    
    func loadMatchSoccer() {
        
        let query = Soccer.query() as! PFQuery<Soccer>
        
        
        query.findObjectsInBackground  { (objects, error) in
            if error == nil {
                self.selectedSoccer = objects!
                
                
                
                DispatchQueue.main.async(execute: {
                    self.tableView.reloadData()
                })
                
                
                
            } else {
                print(error!)
            }
        }
    }
    }

#2