Skip to content

Commit

Permalink
Fix #21 : Add methodSignatureForSelector
Browse files Browse the repository at this point in the history
  • Loading branch information
ppaulojr committed May 22, 2018
1 parent 38aee23 commit a9e7137
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions PPJEmailPicker.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
Expand Down
15 changes: 13 additions & 2 deletions PPJEmailPicker/PPJEmailPicker.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a9e7137

Please sign in to comment.