报错如下:
2015-12-14 15:47:15.039 Demo[3133:1270242] +[NSObject previewingContext:viewControllerForLocation:]: unrecognized selector sent to class 0x19f698020
2015-12-14 15:47:15.043 Demo[3133:1270242] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSObject previewingContext:viewControllerForLocation:]: unrecognized selector sent to class 0x19f698020'
*** First throw call stack:
(0x1815b9900 0x180c27f80 0x1815c0514 0x186aea92c 0x186636ff4 0x1868ef930 0x1868f042c 0x1868f14a4 0x18682cdbc 0x1864505b8 0x1862de9b0 0x18682e3bc 0x18629db58 0x18629a8dc 0x1862dc820 0x1862dbe1c 0x1862ac4cc 0x1862aa794 0x181570efc 0x181570990 0x18156e690 0x18149d680 0x1829ac088 0x186314d90 0x1000724b0 0x18103e8b8)
libc++abi.dylib: terminating with uncaught exception of type NSException我发现在AppStroe还有好多应用也出现这样的问题,只有真机才能测试出来,且支持3D Touch。求解决方案:
感激不尽!!

解决方案 »

  1.   

    @implementation UICollectionViewController (IA3DTouchFix)///修复Apple相册3DTouch崩溃问题Archer
    - (nullable UIViewController *)previewingContext:(id <UIViewControllerPreviewing>)previewingContext viewControllerForLocation:(CGPoint)location{
        return nil;
    }
    @end任意.m插入这个代码,原理就是用分类实现这个代理,从而避免转发异常。~