I am trying to implement a view layout with two simple containers side by side in the style of an iPad panel.
I read numerous examples and, of course, the link to the Apple View controller for view controllers and in general, but I have the strangest problem, which I hope has a simple explanation.
I added two side-by-side view containers, each of which will have a viewcontroller with a different background color, one Round Rect button and a shortcut. And for testing, I also added a Round Rect button to the "mainViewController".
So rightly and simply. Each view is loaded into the container view, but I canβt interact with any of them (when the button is pressed, NOTHING happens, the blue highlighting is not highlighted, so there is no question of delegation or any action using the buttons, nothing like this has been implemented). However, pressing the button that I installed in the "mainViewController" holding two containers works flawlessly (as always). Another strange thing: the background color does not appear on container views ?! Buttons and tags only.
The program is as follows:
Files: ViewController.h and .m ("mainViewController") sidebarViewController.h and .m (nothing has changed in these files, UIViewController) resultsViewController.h and .m (nothing has changed in these files, UIViewController) AppDelegate.h and. m (no change) Storyboard
ViewController.h, outputs created and connected to each type of container in the storyboard.
The storyboard identifier set in both the sidebarViewcontroller and the Resultsview controller in the storyboard.
ViewController.m, all that is done in the book (or probably not, but at least it seems to me)
(I also had self.xxxxView, and also had the addChildViewController statement in order)
Well, thatβs why my suspicion, of course, is related to the hierarchy of views, the views behind the view of the rootViewController and therefore are shown only non-interactively. What (if something) needs to be done in the App delegate to make this work? Or did I do something else wrong with this code?
Edit: I found another key to what might be wrong: when I turned off Auto View for storyboards, the views displayed and worked (!), But were completely distorted, but now at least I get the correct background color and the buttons work . Does anyone know how to fix this without disabling autoscaling? since I assume that I should do all my layout programmatically then ?: (
Many thanks,