views:

161

answers:

1

Building an iPad app. I have a button on my main view that I want to launch a help window. The help window is fairly involved and has its own xib/controller. I resized the help window's XIB and saved it. I instantiated it and added it to the application controller's views as a modal. For some reason this window is still taking up the entire screen.

What I really want to do is have a "view" that's maybe 70% of the width and height that lays over the normal view as a modal. How is this accomplished normally? I want it to require that they hit a button to close it.

Thanks

+1  A: 

You could also try placing your UIView into another UIView that actually takes up the entire screen, but has a backgroundColor = [UIColor clearColor].

Modal view controllers are really intended to take up the entire screen, as Apple's description states "Modal view controllers are a tool that you have at your disposal for displaying a new screen’s worth of content" (http://developer.apple.com/iphone/library/featuredarticles/ViewControllerPGforiPhoneOS/ModalViewControllers/ModalViewControllers.html).

DougW
Well, I want to prevent interaction with the window behind it. I'm still missing something. I was able to set the background color to clear and overlay, but you can still click through it and/or around it. If I do a modal, it still shows with a white background that covers the entire screen even if I set the color to clear.
James
@James Yeah, the answer is you just shouldn't be using modal for that. Modal windows are designed and intended to take over the entire experience. You may need to replicate the behavior you want without presenting modally.
DougW
@James Don't want to go into detail and violate the NDA, but you ought to keep your eyes open for iOS 4. It has some new objects that are intended to do what you want.
DougW