Latest 2.1.1
Homepage https://github.com/seivan/SHNavigationControllerBlocks
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 UINavigationController – willShow and didShow.
The blocks are automatically removed once they UINavigationController is gone, so it isn’t necessary to clean up – Swizzle Free(™)

API

Properties

Installation

pod 'SHNavigationControllerBlocks' 
pod 'SHNavigationControllerBlocks', '~> 1.0.0' # for iOS 6

Setup

Put this either in specific files or your project prefix file

#import "UINavigationController+SHNavigationControllerBlocks.h"

or

#import "SHNavigationControllerBlocks.h"

API

Properties


#pragma mark - Block Definitions
typedef void (^SHNavigationControllerBlock)(UINavigationController * navigationController,
                                            UIViewController       * viewController,
                                            BOOL                      isAnimated);

typedef UIInterfaceOrientation(^SHNavigationControllerOrientationBlock)(UINavigationController * navigationController);

typedef id<UIViewControllerInteractiveTransitioning>
(^SHNavigationControllerInteractiveControllerBlock)(UINavigationController * navigationController,
                                                    id<UIViewControllerAnimatedTransitioning> animationController);

typedef id<UIViewControllerAnimatedTransitioning>
(^SHNavigationControllerAnimatedControllerBlock) (UINavigationController * navigationController,
                                                  UINavigationControllerOperation operation,
                                                  UIViewController * fromVC,
                                                  UIViewController * toVC
                                                  );

@interface UINavigationController (SHNavigationControllerBlocks)

#pragma mark - Properties

#pragma mark - Setters

-(void)SH_setWillShowViewControllerBlock:(SHNavigationControllerBlock)theBlock;

-(void)SH_setDidShowViewControllerBlock:(SHNavigationControllerBlock)theBlock;

-(void)SH_setPreferredInterfaceOrientationForPresentatationBlock:(SHNavigationControllerOrientationBlock)theBlock;

-(void)SH_setInteractiveControllerBlock:(SHNavigationControllerInteractiveControllerBlock)theBlock;

-(void)SH_setAnimatedControllerBlock:(SHNavigationControllerAnimatedControllerBlock)theBlock;

#pragma mark - Getters

@property(nonatomic,readonly) SHNavigationControllerBlock SH_blockWillShowViewController;
@property(nonatomic,readonly) SHNavigationControllerBlock SH_blockDidShowViewController;
@property(nonatomic,readonly) SHNavigationControllerOrientationBlock SH_blockInterfaceOrientationForPresentation;
@property(nonatomic,readonly) SHNavigationControllerInteractiveControllerBlock SH_blockInteractiveController;
@property(nonatomic,readonly) SHNavigationControllerAnimatedControllerBlock SH_blockAnimatedController;

@end

Contact

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

email: [email protected]
twitter: @seivanheidari

License

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

Latest podspec

{
    "name": "SHNavigationControllerBlocks",
    "version": "2.1.1",
    "summary": "Blocks for UINavigationController life cycle willShow & didShow and animations for transitions & interaction - swizzle free!",
    "description": "n                    * Swizzle and junk freen                    * No need to clean up after - The blocks are self maintained.n                    * UINavigationController is referenced in a map with weak propertiesn                    * Prefixed selectors.n                    * Minimum clutter on top of the public interface.n                    n",
    "homepage": "https://github.com/seivan/SHNavigationControllerBlocks",
    "license": "MIT",
    "authors": {
        "Seivan Heidari": "[email protected]"
    },
    "source": {
        "git": "https://github.com/seivan/SHNavigationControllerBlocks.git",
        "tag": "2.1.1"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source_files": "SHNavigationControllerBlocks/**/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This