I have a strange problem that I have not been able to resolve. I have a relatively large app with segues to modal view controllers from both UIViewControllers and UITableViewControllers. The UIViewControllers seem to work fine, however, I have an inconsistent problem with the table view controllers. The tab bar is displayed when I segue to the modal controller, and it displays correctly in the model view. However, when I dismiss the modal controller, there is a 50/50 chance that the tab bar on the table view controller will be gone. The background view extends right to the bottom of the screen. The tab bar is translucent, so I want the background to extend behind it, but I have no idea why in some instances (with same controllers and same situation) work correctly and some don't. I haven't been able to find any pattern.
Before segue to modal:

Upon return from modal:

Initial tableview controller:
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
if optionEnabled[indexPath.row] {
let segues:[String] = ["profileMenuSegue", "servicesProvidedSegue", "myWorkDaySegue", "myWorkWeekSegue", "timeOffSegue", "myAvailabilitySegue", "staffSegue", "promoSegue", "activateAccountSegue", "addWeekSegue"]
performSegueWithIdentifier(segues[indexPath.row], sender: self)
}
}
Modal view controller:
Alamofire.request(.POST, url, parameters: params, encoding: ParameterEncoding.URL)
.validate()
.responseJSON { (request, _, result) in
switch result {
case .Success(let data):
json = JSON(data)
print(json)
print("request successful")
dispatch_async(dispatch_get_main_queue(), { () -> Void in
self.dismissViewControllerAnimated(true, completion: nil)
})
case .Failure(_, let error):
print("request failed")
print(error)
}
}
I've tried all the "Extend Edges" settings both on and off, and I've tried overriding the "Inferred" for both top bar and bottom bar. I have presentation set to "Current Context" on all view controllers.
Any suggestions greatly appreciated, as I am running out of things to try.
I had the same problem and I fixed selecting "Over Current Context" on the presentation type of the segue. See image:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With