IOS 8 および XCODE 6 に移行した後、MWPhoto ライブラリで問題が発生しています。エラーは PSTCollectionView クラスで発生します。なぜMissing context for method declaration
エラーが返されるのか不思議です。以下に、エラーのコードと画像を示します。
#import <objc/runtime.h>
- (NSMethodSignature *)methodSignatureForSelector:(SEL)selector {
NSMethodSignature *signature = [super methodSignatureForSelector:selector];
if (!signature) {
NSString *selString = NSStringFromSelector(selector);
if ([selString hasPrefix:@"_"]) {
SEL cleanedSelector = NSSelectorFromString([selString substringFromIndex:1]);
signature = [super methodSignatureForSelector:cleanedSelector];
}
}
return signature;
}
- (void)forwardInvocation:(NSInvocation *)invocation {
NSString *selString = NSStringFromSelector([invocation selector]);
if ([selString hasPrefix:@"_"]) {
SEL cleanedSelector = NSSelectorFromString([selString substringFromIndex:1]);
if ([self respondsToSelector:cleanedSelector]) {
invocation.selector = cleanedSelector;
[invocation invokeWithTarget:self];
}
}else {
[super forwardInvocation:invocation];
}
}
@end