代码之家  ›  专栏  ›  技术社区  ›  jeremyabannister

Swift macOS---[_SwiftValueOBJCTYPE]:发送到实例的无法识别的选择器

  •  1
  • jeremyabannister  · 技术社区  · 6 年前

    以下是错误的截断版本:

    2018-09-30 16:11:12.786201-0700 MacPlayground[57283:3255328] -[_SwiftValue objCType]: unrecognized selector sent to instance 0x6040004464e0
    2018-09-30 16:11:12.786610-0700 MacPlayground[57283:3255328] [General] -[_SwiftValue objCType]: unrecognized selector sent to instance 0x6040004464e0
    2018-09-30 16:11:12.793434-0700 MacPlayground[57283:3255328] [General] (
        0   CoreFoundation                      0x00007fff3f6a12db __exceptionPreprocess + 171
        1   libobjc.A.dylib                     0x00007fff66856c76 objc_exception_throw + 48
        2   CoreFoundation                      0x00007fff3f739db4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
        3   CoreFoundation                      0x00007fff3f617820 ___forwarding___ + 1456
        4   CoreFoundation                      0x00007fff3f6171e8 _CF_forwarding_prep_0 + 120
        5   QuartzCore                          0x00007fff4aa0cf8c _ZL9getValuesP7NSValuePdRm + 51
        6   QuartzCore                          0x00007fff4aa0cbba -[NSValue(CAAnimatableValue) CA_interpolateValue:byFraction:] + 159
        7   QuartzCore                          0x00007fff4a996855 -[CABasicAnimation applyForTime:presentationObject:modelObject:] + 532
        8   QuartzCore                          0x00007fff4a9a6df1 _ZN2CA5Layer18presentation_layerEPNS_11TransactionE + 683
        9   UICore                              0x000000010035d5a0 $SSo6NSViewC6UICoreE23currentlyPresentedValue33_87359CB0FAD3031CD028C558F7C6F5D1LL6forKeyypSgSS_tF + 1248)
    

    当我打电话时(在某些未知条件下)会发生这种情况 layer.presentation() 在NSView的背衬层上。有人知道为什么获取表示层会导致无法识别的选择器错误吗?

    0 回复  |  直到 6 年前