Skip to content


Subversion checkout URL

You can clone with
Download ZIP
UIViewControllers containment predating Apple implementation. Works in both 4.x and 5.x iOS, no memory or hierarchy issues.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Sample Projects ARC
Sample Projects

UPDATE: I'm no longer using SFContainerViewControllers in any project, it was created way before there was native view controller contaiment in iOS, it's been a long time since Apple added it as part of the system, you should use Apple's implementation.


SFContainerViewController is a UIViewController subclass that can have multiple UIViewController children. No memory problems, if this controller is not visible, it will unload its view and all of his children views. From the children view you can use freely navigationController, parentViewController ( will point to container itself ), interfaceOrientation.

Follow me on twitter

Supported OS & SDK Versions

  • iOS 4.0 (Xcode 4.3, Apple LLVM compiler 3.1)

ARC Compatibility

SFContainerViewController automatically works with both ARC and non-ARC projects through conditional compilation. There is no need to exclude SFContainerViewController files from the ARC validation process, or to convert CCNode+SFGestureRecognizers using the ARC conversion tool.


To use the SFContainerViewController class in an app, just drag the class files (demo files and assets are not needed) into your project.

Just subclass from SFContainerViewController, set viewControllers to your selected controllers and implement loadView so that you can have your own view to layout your controllers.


@property (nonatomic, copy) NSArray *viewControllers;

Children view controllers of this container.

Something went wrong with that request. Please try again.