Trying to make a shadow on top of the tableView, here’s the code:

tableView.layer.masksToBounds = false tableView.layer.shadowColor = UIColor.black.cgColor tableView.layer.shadowOffset = CGSize(width: -5.0, height: -5.0) tableView.layer.shadowOpacity = 1.0 

I also tried to set CGSize.zero , but the shadow is still not shown.

This is what I want:

that's what should work

  • Is this an hour not a cell in the picture? - VAndrJ
  • @VAndrJ no, this is the beginning of a UITableView above it above the usual UIView - Denis Borodavchenko
  • It looks just like CardView. It is strange that is not added. Must. Xt and not the same as in the picture. Where do you add it? - VAndrJ
  • @VAndrJ in viewDidLayoutSubviews - Denis Borodavchenko
  • And how are the elements themselves placed? Can you attach the project where the problem is reproduced? - VAndrJ

0