Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing context for method declaration in IOS 8 for MWPhotoBrowser

I am having problems with MWPhoto library after moving to IOS 8 and XCODE 6. The error occurs in PSTCollectionView class. I am wondering why it returns me Missing context for method declaration error. Below you can find the code and image for error.

#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

enter image description here

like image 920
birdcage Avatar asked Sep 19 '14 06:09

birdcage


1 Answers

i update PSTCollectionView from github and now works fine https://github.com/steipete/PSTCollectionView

like image 66
Mattia Lancieri Avatar answered Sep 28 '22 17:09

Mattia Lancieri