Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (23 sloc) 0.771 kB
//
// UIViewController+NGTabBarItem.m
// NGTabBarController
//
// Created by Tretter Matthias on 24.04.12.
// Copyright (c) 2012 NOUS Wissensmanagement GmbH. All rights reserved.
//
#import "UIViewController+NGTabBarItem.h"
#import "NGTabBarItem.h"
#import "NGTabBarController.h"
#import <objc/runtime.h>
static char itemKey;
@implementation UIViewController (NGTabBarItem)
- (void)ng_setTabBarItem:(NGTabBarItem *)ng_tabBarItem {
objc_setAssociatedObject(self, &itemKey, ng_tabBarItem, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
- (NGTabBarItem *)ng_tabBarItem {
return objc_getAssociatedObject(self, &itemKey);
}
- (NGTabBarController *)ng_tabBarController {
return (NGTabBarController *)objc_getAssociatedObject(self, kNGTabBarControllerKey);
}
@end
Jump to Line
Something went wrong with that request. Please try again.