SHInvocation 0.9.3

SHInvocation 0.9.3

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布最新发布2014年12月

Seivan Heidari 维护。



  • Seivan Heidari

此 Pod 被 SHFoundationAdditions 使用,作为几个组件的部分,这些组件改进了 Foundation、UIKit、CoreLocation、GameKit、MapKit 以及 iOS 应用架构的其他方面。

概览

SHInvocation 是在 NSInvocation 之上创建的类别,允许执行带有多个

安装

pod 'SHInvocation'

设置

请将这些内容放在特定的类或您的项目前缀文件中

#import "NSInvocation+SHInvocation.h"

或者

#import "SHInvocation.h"

API

+(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 文件。