Black bar appears under navigation bar
Late answer but I stumbled across this problem today and found your question and it doesn't have an accepted answer yet.
I got this error while going from a prompted viewController to a non prompted viewController in storyboard.
I got that black bar just like you.
And to fix:
// In prompted vc
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
UIView.setAnimationsEnabled(false)
self.navigationItem.prompt = nil
UIView.setAnimationsEnabled(true)
}
This will remove the prompt instantly before switching viewcontroller.
UPDATE
func prompt() -> String? {
return nil
}
override func viewWillAppear(animated: Bool) {
let action = { self.navigationItem.prompt = self.prompt() }
if self.navigationController?.viewControllers.count <= 1 {
UIView.performWithoutAnimation(action)
}
else {
action()
}
}
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
UIView.performWithoutAnimation {
self.navigationItem.prompt = (segue.destinationViewController as? ViewController)?.prompt()
}
}
Xcode black bar on top of view controller after connecting segue
This is because the segue to the second ViewController is a "show", and the second VC will show like this:
If you want this VC to be full screen, click on the segue you created, change the "Kind" property to "Present Modally", and the "Presenttion" property to "Full Screen":
Related Topics
How to Define an Enum as a Subset of Another Enum's Cases
Adding Nscoding as an Extension
Swift: How to Animate the Rowheight of a Uitableview
Cannot Assign to Property: 'Xxxx' Is a Get-Only Property
Swift: Force Show Navigation Bar in Modal
How to Fix ' *Pod* Does Not Support Provisioning Profiles' in Azure Devops Build Agent
Confusion Regarding Overriding Class Properties in Swift
Change Default Global Tint Color in Swift
Delegate Using Container View in Swift
How to Initialise Cvpixelbufferref in Swift
How to Create a Hud on Top of My Scenekit.Scene
How to Retrieve the Type of an Object in Swift
Xcode 10 Beta 5 - Clang: Error: Linker Command Failed with Exit Code 1
How to Position Child Skspritenodes Inside Their Parents
Ios9: Using Dynamic Framework with Simulator and Device
How to Rearrange Views in Swiftui Zstack by Dragging
How to Convert Nsset to [String] Array
Scrollbar Incorrectly Appears Underneath Uicollectionview Section Header