I'm working on a program where the main screen has two primary subviews that need to get swapped out, and Interface Builder is not liking letting me work with the one lower in the stack (e.g. when I try to add constraints it tags something higher in the stack). Somewhere along the way someone suggested that this would be a great use for
I can't interact with it. At. All.
Nothing is letting me access the embedded view's properties, methods, or subviews. I just keep getting hits for trying to call things that don't exist.
What's the piece that I'm missing here?
You need to do this manually. If you are displaying another View Controller inside
OK, I think I get it conceptually, but I'm having trouble figuring out how to do it in practice. If I lay out some code basics here, can someone explain how to get it wired up properly?
Here's the original configuration, before trying to move it out to containers:
Here's how I think I'm supposed to implement the above?
This is one of a few things I have never done entirely in Storyboards because it is confusing and error prone.
My approach is usually to add
And then the setup looks like this:
As a last step I am assigning the view controller to local variable. This should either be
So Xcode fought me on the storyboard thing, first by saying
I've tried applying the same principles slightly differently, however, as shown in the following example. Basically, I created a
In the end, however, it's still dealing with the same issue: bailing out whenever the properties of the view are invoked, even though we established the child view and added it...
SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.