Latest 0.0.2
Homepage https://github.com/belkevich/uiviewcontroller-subcontrollers
License MIT
Platforms ios 6.0, requires ARC
Authors

About

Add subscontrollers in one line.

Using

#import "UIViewController+Subcontrollers.h"

@implementation MyViewController
...
- (void)addSubcontrollers
{
    // add subcontroller to main view
    [self addSubcontroller:self.mainSubcontroller];
    // add subcontroller to custom view
    [self addSubcontroller:self.customSubcontroller toView:self.customView];
    // add subcontroller to custom view with custom frame
    [self addSubcontroller:self.frameSubcontroller toView:self.customView
                     frame:CGRectMake(0.f, 0.f, 100.f, 100.f)];
}
...
- (void)removeSubcontrollers
{
    [self.mainSubcontroller removeFromParentController];
    [self.customSubcontroller removeFromParentController];
    [self.frameSubcontroller removeFromParentController];
}
...

Installation

Add UIViewController+Subcontrollers pod to your Podfile

News and updates

@okolodev

Latest podspec

{
    "name": "UIViewController+Subcontrollers",
    "version": "0.0.2",
    "summary": "Add subcontrollers in one line.",
    "homepage": "https://github.com/belkevich/uiviewcontroller-subcontrollers",
    "social_media_url": "https://twitter.com/okolodev",
    "license": {
        "type": "MIT",
        "file": "LICENSE.txt"
    },
    "authors": {
        "Alexey Belkevich": "[email protected]"
    },
    "source": {
        "git": "https://github.com/belkevich/uiviewcontroller-subcontrollers.git",
        "tag": "0.0.2"
    },
    "platforms": {
        "ios": "6.0"
    },
    "source_files": "Pod/**/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This