此 Pod 被
SHFoundationAdditions
使用,作为几个组件的部分,这些组件改进了 Foundation、UIKit、CoreLocation、GameKit、MapKit 以及 iOS 应用架构的其他方面。
SHInvocation 是在 NSInvocation 之上创建的类别,允许执行带有多个
pod 'SHInvocation'
请将这些内容放在特定的类或您的项目前缀文件中
#import "NSInvocation+SHInvocation.h"
或者
#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]);
如果您在项目中使用了 SHInvocation,我会很乐意听到您的反馈。
电子邮件:[email protected]
twitter:@seivanheidari
SHInvocation 是 © 2013 Seivan 并可以在 MIT 许可证下自由分发。请参阅 LICENSE.md
文件。