I have the following simple case:
A UINavigationController
, with a root view controller which contains a tableView
spanning the whole view, and then a button
at the bottom of the screen. I create the button like that:
let button = UIButton(frame: CGRect(x: 0, y: self.view.frame.height - 50, width: self.view.frame.width, height: 50))
self.view.addSubview(button)
This works fine, until I do the following:
navigationController?.navigationBar.isTranslucent = false
This will make my button created disappear. Can someone explain to me the reason for that? And how to fix that? Here is a screenshot of my simple case. The button at the bottom disappears.
Edit: For context: I am using Eureka library for setting up my forms in the tableView
, and wanted to add a sticky button at the bottom.