TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Seivan Heidari.
This pod is used by
SHFoundationAdditions
as part of several components improving Foundation, UIKit, CoreLocation, GameKit, MapKit and other aspects of an iOS application's architecture
SHInvocation is a category on top of NSInvocation to allow executing selectors with multiple
pod 'SHInvocation'
Put this either in specific classes or your project prefix file
#import "NSInvocation+SHInvocation.h"
or
#import "SHInvocation.h"
+(BOOL)SH_performInvocationOnTarget:(id)theTarget
withSelector:(SEL)theSelector
andArguments:(NSArray *)theArguments;
NSString * firstArgument = @"My first Argument";
NSArray * secondArgument = @[firstArgument, firstArgument, firstArgument];
BOOL didInvoke = [NSInvocation SH_performInvocationOnTarget:self
withSelector:@selector(passTheFirstArgument:passTheSecondArgument:)
andArguments:@[firstArgument, secondArgument]];
NSParameterAssert(didInvoke);
NSParameterAssert([self.firstArgument isEqualToString:firstArgument]);
NSParameterAssert([self.secondArgument isEqual:secondArgument]);
If you end up using SHInvocation in a project, I'd love to hear about it.
email: [email protected]
twitter: @seivanheidari
SHInvocation is © 2013 Seivan and may be freely
distributed under the MIT license.
See the LICENSE.md
file.