diff --git a/PPJEmailPicker.podspec b/PPJEmailPicker.podspec index c439aac..9be55ac 100644 --- a/PPJEmailPicker.podspec +++ b/PPJEmailPicker.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "PPJEmailPicker" - s.version = "1.1.10" + s.version = "1.1.11" s.summary = "An UITextField replacement to select multiple e-mails" # This description is used to generate tags and improve search results. @@ -70,7 +70,7 @@ The goal is to create a control similar to GMail, Outlook or Mail.app `from` fie # Supports git, hg, bzr, svn and HTTP. # - s.source = { :git => "https://github.com/ppaulojr/PPJEmailPicker.git", :tag => "1.1.10" } + s.source = { :git => "https://github.com/ppaulojr/PPJEmailPicker.git", :tag => "1.1.11" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # diff --git a/PPJEmailPicker/PPJEmailPicker.m b/PPJEmailPicker/PPJEmailPicker.m index 846f67e..bc60ca9 100644 --- a/PPJEmailPicker/PPJEmailPicker.m +++ b/PPJEmailPicker/PPJEmailPicker.m @@ -24,8 +24,19 @@ - (BOOL)respondsToSelector:(SEL)selector { return [_userDelegate respondsToSelector:selector] || [super respondsToSelector:selector]; } -- (void)forwardInvocation:(NSInvocation *)invocation { - [invocation invokeWithTarget:_userDelegate]; +- (void)forwardInvocation:(NSInvocation *)invocation +{ + SEL aSelector = [invocation selector]; + + if ([_userDelegate respondsToSelector:aSelector]) + [invocation invokeWithTarget:_userDelegate]; + else + [super forwardInvocation:invocation]; +} + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector +{ + return [super methodSignatureForSelector:aSelector] ?: [(NSObject*)_userDelegate methodSignatureForSelector:aSelector]; } #pragma mark - delegate override methods