0

I am writing an iOS app. User types in movie search keywords and it fetches data from omdbapi.com and displays movies in tableview. Issue is that that table view cell isn't getting displayed correctly.

Project URL: project on onedrive

I tried using every autolayout method but, its not working.

   override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
        return UITableViewAutomaticDimension;

    }
Atif Shabeer
  • 167
  • 3
  • 16

1 Answers1

0

You need to set estimate method for table height too. so place these method for height calculation and also check your cell constraint.

 func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
    return UITableViewAutomaticDimension
}

func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
    return UITableViewAutomaticDimension
    }

Hope this will help you.

Pankaj K.
  • 535
  • 8
  • 18