I'm trying to present a navigation controller as a modal and I'm getting this warning:
ERROR:(null) is not a valid containment controller key path
Does anyone know what am I doing wrong? I just connected a segue from a button in another navigation controller to the designated navigation controller and it won't work and I get this warning.
This looks a bug in XCode note the sample "Utility App" displays this warning as well, but functions as expected.
Looks like you're passing a value which is actually holding nothing at all, to your navigation controller. I'd use NSLog to check the contents of the value being passed to the controller, and find out why it's null.
I had the same problem. I realized that the view I was anchoring to for my Popover segue was being deleted, therefore, that view was nil. I fixed that issue and this issue went away.
Related
After updating Xcode I see the message in console:
[Assert] UINavigationBar decoded as unlocked for UINavigationController, or navigationBar delegate set up incorrectly. Inconsistent configuration may cause problems.
And all the data I have in the Navigation Controller scenes are not displays.
I tried to place this to the SceneDelegate, but it wasn't helpful:
self.window?.rootViewController = navigationVC
self.window?.makeKeyAndVisible()
What should I do to fix this?
I'm working on this bug too. I will update here if there is any progress. I'm also facing another exception:
_UINavigationBarContentViewLayout valueForUndefinedKey:
this class is not key value coding-compliant for the key inlineTitleView.
It should be a bug in iOS 16, not related to the Xcode version.
There are many others who have also encountered this problem: https://developer.apple.com/forums/thread/714278
A temporary solution is to use code rather than storyboards to create the navigation controller.
I also find that problem.
How I fix it
If you use storyboards.
Take the arrow( in Attribute inspector-> is initial view controller) from Navigation View Controller in the storyboard and put it in your next View Controller.
Simplify change, initial view controller, in storyboard
Restart Your Mac
And remove unnecessary functions on main class
I've created a table view which is embeded in a Navigation Controller as such and connects to another view controller. I've the connection from the table to the navigation controller as a modal segue and the segue from the table bar to the View Controller as a push segue yet I am still getting the error:
Unsupported Configuration
Scene is unreachable due to lack of entry points and does not have an identifier
for runtime access via -instantiateViewControllerWithIdentifier:
This worked last week and now its not. Ive tried adding storyboard IDs but thats not working. I appreciate any help.
Did you check your start point in your storyboard? In other words, on the left side of your starting navigation controller, do you have the arrow pointing to it? If not, drag it until you make it point to the navigation controller.
Also, if you're doing that dynamically, have you provided your UIViewController/UITableViewController/UINavigationController Storyboard IDs? Please, double check that by clicking on your view controller in your storyboard, then in the Inspector (right side of Xcode window), go to the third tab and make sure you have set the ID and make sure they are consistent with your code.
My application has an initial view asking a password and, when the password is valid, going to a view controller thru a segue.
When application is moving to the background, I would like to force a return to the initial view .
I guess that the corresponding code has to be inserted into app delagate applicationWillResignActive method but after a ton of attempts I can't find the appropriate code.
Thanks in advance for any help.
You need to make sure your controllers are embedded in a navigation controller, and then simply use
popToRootViewControllerAnimated:
if the target controller is the first one, or
popToViewController:animated:
if the target view controller is not the first one. Both methods are called on self.navigationController.
In the view controller that has a UITabBarItem, i realized that viewDidLoad() method only gets called the first time when the tab bar item is clicked. So I dont know how to bring up the dynamic graphics when it's clicked the 2nd time. Can some guru help me on this? thanks in advance.
Should I conform to some kind of delegates or should i do it within didSelectViewController method on the root controller of all the tab bars? If i do the later one, it just seems to be weird since i think the controller that has the corresponding tab bar item should render itself instead of doing the rendering on root controller..
You want to put any code that should run every time the view controller appears in viewWillAppear: instead of viewDidLoad. viewDidLoad is designed for code that should run when the view backed by your UIViewController is created (and then possibly re-created after being thrown away during low-memory situations).
Actually i resolved this by using the parameter passed into the callback didSelectViewController(param).
I've got a UITabBarController in my project that I'm creating programmatically - without a nib. I create the view controllers, initialize them, and then create an array of them and use the setViewControllers:animated: method on my tab bar controller. This works except that when it appears, my tab bar controller doesn't have anything selected. If I call [ tabBarController setSelectedIndex:1 ], then it works just fine, but if I call [ tabBarController setSelectedIndex:0 ], nothing is selected. Is this a weird bug or am I doing it wrong? This is using the iPhone SDK 3.0.
Show your code if you will, will make it easier for us to find the problem...But from not seeing anything, what I would think is wrong is that when you initialize your UITabBarButtons you are not giving any of them an index of 0...
It turns out that the code was written by me a long time ago, when I did stupid things like override the -tabBarItem accessor method in the UIViewController. Moving the tab bar item customization to -initWithStyle: fixed this problem.
This happened for me when I set the UIViewController's tabBarItem property in viewDidLoad instead of its init method.