As Micky below and others mention, this is now done on an everyday basis with Containers in iOS.

I have a ViewController which controls many subviews. When I click one of the buttons I initialize another viewcontroller and show it's view as the subview of this view. However the subview exceeds the bounds of the frame for subview and infact fills the entire screen.

What could be wrong? I presume the problem is that UIViewController's view has a frame (0,0,320,460) and hence fills the entire screen (though it receive's touch events only when touched within the subview frame bounds). How can I resize the frame to fit as subview.

In short, I need help adding a viewcontroller's view as a subview to another viewcontroller's view.

I would recommend against this. I did this for my first iPhone app and it turned out to be a huge bizarre mess, not to mention the fact that it broke a lot of stuff that I was trying to do with Interface Builder. In the 3.0 docs they specifically say - 1 View Controller per screen. You should do this!
–
bpapaSep 28 '09 at 18:42

Yeah even I read about it, but the problem is if I put it all in 1 viewcontroller it is whole lot of code into 1, and there are lots of IBOutlets and actions, and tables. Hence for the sake of clarity and modularity I tried to have 2 seperate viewcontrollers, with the second one just supplying view to the main viewcontroller and handling its own events. This way the main viewcontroller is somewhat cleaner. What should I be doing instead. Should I have multiple view controllers with nav controller or 1 huge view controller.
–
sperumalSep 30 '09 at 21:54

Have a look at this tutorial. It only partially works though
–
CasebashSep 23 '10 at 0:37

plus 1 for the five years out of date notice
–
quemefulJan 27 at 10:46

iOS provides many standard containers to help you organize your apps. However, sometimes you need to create a custom workflow that doesn’t match that provided by any of the system containers. Perhaps in your vision, your app needs a specific organization of child view controllers with specialized navigation gestures or animation transitions between them. To do that, you implement a custom container - Tell me more...

...and:

When you design a container, you create explicit parent-child relationships between your container, the parent, and other view controllers, its children - Tell me more