How to solve CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]?

前端 未结 3 906
逝去的感伤
逝去的感伤 2020-12-30 03:38

I have an error where it crash the application when it is starting up. This is the error that i got:

*** Terminating app due to uncaught exception \'CALayerI         


        
3条回答
  •  借酒劲吻你
    2020-12-30 04:20

    I know this question is not very recent but I just want to give an answer. Anyway, I'm guessing your mapView is of AGSMapView and you have initialized it this way:

    self.mapView = [[[AGSMapView alloc] init] autorelease];
    

    Now, I think the better, if not the only correct way, to initialize it is using initWithFrame. Though I'm not sure why, mapView is broken if you use init for the initialization.

    Hope this helps.

提交回复
热议问题