Latest 2.0.1
Homepage https://github.com/seivan/SHTabBarControllerBlocks
License MIT
Platforms ios 7.0, requires ARC
Authors

CI Status
Version
Platform
License

This pod is used by SHUIKitBlocks as part of many components covering to plug the holes missing from Foundation, UIKit, CoreLocation, GameKit, MapKit and other aspects of an iOS application’s architecture.

Overview

Life cycle blocks for UITabBarController.
The blocks are automatically removed once they UITabBarController is gone, so it isn’t necessary to clean up – Swizzle Free(™)

API

Properties

Installation

Installation

pod 'SHTabBarControllerBlocks' 
pod 'SHTabBarControllerBlocks', '~> 1.1.0' # for iOS 6

Setup

Put this either in specific files or your project prefix file

#import "UITabBarController+SHTabBarControllerBlocks.h"

or

#import "SHTabBarControllerBlocks.h"

API

Properties


#pragma mark - Block Defintions
typedef BOOL (^SHTabBarControllerPredicateBlock)(UITabBarController  * theTabBarController,
UIViewController * theViewController);

typedef void (^SHTabBarControllerBlock)(UITabBarController  * theTabBarController,
UIViewController * theViewController);

typedef void (^SHTabBarControllerCustomizingBlock)(UITabBarController  * theTabBarController,
NSArray  * theViewControllers);

typedef void (^SHTabBarControllerCustomizingWithChangeBlock)(UITabBarController  * theTabBarController,
NSArray * theViewControllers,
BOOL      isChanged);

typedef id<UIViewControllerInteractiveTransitioning>
(^SHTabBarControllerInteractiveControllerBlock)(UITabBarController * tabBarController,
                                                id<UIViewControllerAnimatedTransitioning> animationController
                                                );

typedef id<UIViewControllerAnimatedTransitioning>
(^SHTabBarControllerAnimatedControllerBlock) (UITabBarController * tabBarController,
                                              UIViewController * fromVC,
                                              UIViewController * toVC
                                              );

@interface UITabBarController (SHTabBarControllerBlocks)

#pragma mark - Properties

#pragma mark - Setters
-(void)SH_setShouldSelectViewControllerBlock:(SHTabBarControllerPredicateBlock)theBlock;
-(void)SH_setDidSelectViewControllerBlock:(SHTabBarControllerBlock)theBlock;
-(void)SH_setWillBeginCustomizingViewControllersBlock:(SHTabBarControllerCustomizingBlock)theBlock;
-(void)SH_setWillEndCustomizingViewControllersBlock:(SHTabBarControllerCustomizingWithChangeBlock)theBlock;
-(void)SH_setDidEndCustomizingViewControllersBlock:(SHTabBarControllerCustomizingWithChangeBlock)theBlock;
-(void)SH_setInteractiveControllerBlock:(SHTabBarControllerInteractiveControllerBlock)theBlock;
-(void)SH_setAnimatedControllerBlock:(SHTabBarControllerAnimatedControllerBlock)theBlock;

#pragma mark - Getters
@property(nonatomic,readonly) SHTabBarControllerPredicateBlock SH_blockShouldSelectViewController;
@property(nonatomic,readonly) SHTabBarControllerBlock SH_blockDidSelectViewController;
@property(nonatomic,readonly) SHTabBarControllerCustomizingBlock SH_blockWillBeginCustomizingViewControllers;
@property(nonatomic,readonly) SHTabBarControllerCustomizingWithChangeBlock SH_blockWillEndCustomizingViewControllers;
@property(nonatomic,readonly) SHTabBarControllerCustomizingWithChangeBlock SH_blockDidEndCustomizingViewControllers;
@property(nonatomic,readonly) SHTabBarControllerInteractiveControllerBlock SH_blockInteractiveController;
@property(nonatomic,readonly) SHTabBarControllerAnimatedControllerBlock SH_blockAnimatedController;

@end

Contact

If you end up using SHTabBarControllerBlocks in a project, I’d love to hear about it.

email: [email protected]
twitter: @seivanheidari

License

SHTabBarControllerBlocks is © 2013 Seivan and may be freely
distributed under the MIT license.
See the LICENSE.md file.

Latest podspec

{
    "name": "SHTabBarControllerBlocks",
    "version": "2.0.1",
    "summary": "Blocks for UITabBarController replacing delegates - libffi & swizzle free!",
    "description": "n                    * Swizzle and junk freen                    * No need to clean up after - The blocks are self maintained.n                    * Prefixed selectors.n                    * Minimum clutter on top of the public interface.n                    * Replacing delegate calls with blocks instead.n                    n",
    "homepage": "https://github.com/seivan/SHTabBarControllerBlocks",
    "license": "MIT",
    "authors": {
        "Seivan Heidari": "[email protected]"
    },
    "source": {
        "git": "https://github.com/seivan/SHTabBarControllerBlocks.git",
        "tag": "2.0.1"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source_files": "SHTabBarControllerBlocks/**/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This