Using presentViewController (or other techniques) to show a view but not in full screen mode?

presentmodalviewcontroller, uiview, uiviewcontroller

Solution

On iPhone and iPod you can't do this with presentViewController, as the docs say this is only for full screen ViewControllers. Your best choice is to use a child ViewController. Take a look at the ViewController containment guide. http://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/CreatingCustomContainerViewControllers/CreatingCustomContainerViewControllers.html

Problem

According to the documentation, `presentViewController` can only work in full screen mode for iPhone and iPod. However, I need a similar functionality, which can show some portion of the view from the view controller that is to be loaded (call it B). Given a current view controller A, I want to bring up B to take some info from the user, but it has to be in a different view controller for my design purposes. I tried to set `modalPresentationStyle` to different values and resize the view in B, but it always shows the whole view in B. Is there anyway to show some portion of the view in B? I'm looking for something similar to the twitter's popup, which is a view controller and can be shown with `presentViewController`.

Original source