标签云

微信群

扫码加入我们

WeChat QR Code


What's the actual problem you're having?

2018年12月16日07分10秒

When the view loads, I see the pink view. I'm guessing I must not be coding it correctly.

2018年12月16日07分10秒

Right, OK. First of all, step through the code one line at a time and make sure none of the objects are nil. Specificalyl self.aboutVC, self.utilityView and self.aboutVC.aboutView.

2018年12月15日07分10秒

You are correct. The self.aboutVC.aboutView is nil. But I wired everything up in the storyboard. I'll update my question with the image.

2018年12月15日07分10秒

What's ur first button and what's your second button? And when u say the blueview where the pink is...do u mean once the blueview is on screen—still the 'X' and the '?' Are hanging there at the top of the view?

2018年12月16日07分10秒

I'll try this when I get into the office. Thank you. I still think you're AWESOME!!! :-)

1970年01月01日00分03秒

L O L let's work it out one step at a time!

2018年12月15日07分10秒

You're funny, Joe. This solves my damned problem using a Container View. :-) I wanted to do it in code simply because I did it before in code (once....and over a year ago). I started off, like everybody else, using the storyboard. My ex-coworkers were Sr. iOS developers and didn't want to use storyboards because we had too many windows. So my experience with storyboards and segues are extremely weak. Recently, I've been working with AVFoundation and camera controls and NOT UI stuff. When you get slung around it's easy to forget the basics.

2018年12月15日07分10秒

I might still need a little more help with the little "square in a square" Masonic symbol thingy!!! :-)

2018年12月15日07分10秒

iOS 9's Storyboard References make container views even more awesome. You can define your reusable view(controller) wherever you like and reference it from any container view in multiple, modular storyboards.

2018年12月15日07分10秒

Is setting frame necessary? or it will give the view a default frame according to the storyboard?

2018年12月16日07分10秒

Brian, it's probably not necessary if the view you're adding is full screen, but I usually add it any way to make sure. Also, in this case, I wasn't sure if self.utilityView was the full view or the part of the view below the tool bar, in which case, you probably do need to to set the frame.

2018年12月16日07分10秒

it's 100% not necessary, it's what the storyboard is for guys!

2018年12月15日07分10秒

rdelmar - Thank you for your information. I wondered if I should be using instantiateViewControllerWithIdentifier but was a bit confused. Also, yes, self.utilityView is not the full view. All 3 subviews are the same size, so I didn't think I needed to set the frame size. I'll try your suggestion when I get into the office.

2018年12月15日07分10秒

JoeBlow, The OP mentioned using a container view in the storyboard, but said they wanted to do it in code.

2018年12月16日07分10秒