I am trying to add a table view programmatically, but the large title is not displayed.
Here is my code:
self.view.addSubview(module.tableView) module.view.translatesAutoresizingMaskIntoConstraints = false if #available(iOS 11.0, *) { NSLayoutConstraint.activate([ module.view.topAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.topAnchor, constant: 0), module.view.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor, constant: 0), module.view.leadingAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.leadingAnchor, constant: 0), module.view.trailingAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.trailingAnchor, constant: 0) ]) }
Note: large headers are included in the view controller.
if
Perhaps this is important: I'm trying to add a table as a child view controller. My child controller is a UITableViewController. And if I add a child view to viewDidLoad() , a large heading will appear, but it will not scroll.
Here is the link to the file where I add my child module. The detailed code you can see is here in the addChild(module:) method.
Let me know how to fix this error.
source share