Latest 0.1.0
License MIT
Platforms ios 8.0



To run the example project, clone the repo, and run pod install from the Example directory first.


iOS 8.0+


AHContainerViewController is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "AHContainerViewController"


After installing the pod in your project or adding both of the classes i.e. AHContainerViewController and AHEmptySegue. Drag a Container View Controller in your project and from identity inspector select the view attached to it and set its class as AHContainerViewController.

alt tag

Now select the segue attached to the Container View Controller and add an identifier.

alt tag

Attach ViewControllers to the Container View Controller and set the segue’s custom class to AHEmptySegue.

alt tag

Finally give the identifier of the ViewController you want to show when the Container View first loads.

alt tag


Method segueIdentifierReceivedFromParent of class AHContainerViewController can be used to manipulate between the attached View Controllers by passing in the respective identifiers.

Property currentViewController can be used anytime to know which View Controller is currently on the front and can further be used to get/pass data from/to attached View Controllers.

Using with Swift

In your Bridging-Header.h file add:


Don’t forget to import AHContainerViewController in the class where using it.


Aaqib Hussain, [email protected]


AHContainerViewController is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "AHContainerViewController",
    "version": "0.1.0",
    "summary": "Helper classes written in ObjC for using Container Views.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Aaqib Hussain": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.1.0"
    "platforms": {
        "ios": "8.0"
    "source_files": "AHContainerViewController/Classes/**/*"

Pin It on Pinterest

Share This