ios


dismissViewControllerAnimated sometimes removes navigation bar


I have a MainViewController over which FilterViewController and DetailViewController can be presented when user taps appropriate buttons.
I use the same code to present them:
self.presentViewController(vc, animated: true, completion: nil)
I also use the same code to dismiss them from a navigation bar button:
self.dismissViewControllerAnimated(true, completion: nil)
When FilterViewController is dismissed, everything works like normal, but when DetailViewController is dismissed, navigation bar is removed from MainViewController.
While I can add a block of code to add new navigation bar to MainViewController when DetailViewController is dismissed, I'd very much like to know what could be causing this unusual behaviour?
I know I provided little information to aid in answering this question, but I don't know which parts of code could be relevant for this issue.
Edit:
This is the only viewDid method in MainViewController
override func viewDidLoad() {
self.navigationController?.navigationBar.opaque = true
self.navigationController?.navigationBar.barTintColor = UIColor(red: 0.0745, green: 0.2667, blue: 0.4471, alpha: 1)
self.navigationItem.titleView = UIImageView(image: UIImage(named: "HeadLogo"))
super.viewDidLoad()
}
There are no warnings in the code, only few from ambiguous positions of Storyboard elements.
I don't understand why does dismissal of only DetailViewController remove navigation bar from MainViewController. Other than subview contents, they are basically the same.
EDIT:
When returning from DetailViewController, navigation elements are no longer in subview array

Related Links

Swift framework in ObjectiveC project
Trying to zoom a multilayer set of UIViews
What is the impact of inlining a jpg data into code instead of loading it as external resource
Navigation Bar image not loaded swift
Xcode 8.1 UI Testing twoFingerTap() fails on Google Maps view
Installing third party Objective-C library within Swift 3 / Xcode 8 (SharkORM)
How to Adjust UITableView Height According to the Height Change of the UITableViewCell Inside
Unsafe bytes in Swift 3
Creating an AVPlayerLayer causes simulator to crash
how to replace space with dash in objective-c?
Firebase Realtime Database Get Value and Increment
The model configuration used to open the store is incompatible with the one that was used to create the store
In iOs AVPlayer, addPeriodicTimeObserverForInterval seems to be missing
GCSVideoView can't set view mode
Can't use AutoLayout Constraints on UNNotificationContentExtension
Customize NavigationBar in IOS Objective c Application

Categories

HOME
whatsapp
lua
elf
runnable
jsonschema
android-sms
wget
tcplistener
copy-paste
openframeworks
google-weather-api
sparkpost
threadpool
chart.js2
gyroscope
beanstalkd
realm-java
centroid
esri
icloud-drive
x-sendfile
rhel7
extraction
vue2
otroslogviewer
dsx
formatdatetime
msysgit
pulseaudio
autofocus
azure-cdn
scoring
masm32
ice
zbar
liclipse
iseries-navigator
jeditorpane
hard-drive-failure
statistics-bootstrap
xpdf
sqlfiddle
sql-server-2016-express
geneos
winobjc
gcloud-java
jquery-load
greenfoot
dbfit
linq2db
openocd
ironmq
mtp
voting
realm-list
java-client
kue
culture
formhelper
citymaps
catalina.out
first-class-functions
team-explorer-everywhere
ramdisk
llblgenpro
emacs-jedi
firebird2.1
impdp
hamlc
timestamp-with-timezone
maven-bundle-plugin
rgba
ccr
noindex
j#
jscience
intel-8080
ember-router
duplicate-data
ramaze
combinators
nstreecontroller
custom-protocol
net-ssh
newsgroup
shareware
roguelike

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App