2
NSForwarding: warning: method signature and compiler 
disagree on struct-return-edness of 'mapRegion'.  
Signature thinks it does not return a struct, and compiler thinks it does.

这是EXC_BAD_ACCESS我在启动时随机出现的描述。当然,当我禁用断点时不会。
如果一个随机的 Clang 开发人员偶然发现了这个线程,请告诉我“struct-return-edness”的含义。

堆

周围有什么:

- (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated
{
  [self fetchIfNecessary:mapView];
  [self.annotationController refresh:YES]; // EXC_BAD_ACCES is here but the mentoned 'mapRegion' is probably in a different method

  CGFloat minimumLatitudeDeltaToFetch = 0.2;
  self.shouldDisplayGetCloserMessage = @(mapView.region.span.latitudeDelta > minimumLatitudeDeltaToFetch);
}

- (void)fetchIfNecessary:(MKMapView *)mapView
{
  MKCoordinateRegion region1 = mapView.region;
  MKCoordinateRegion region2 = self.eventRequestClient.mapRegion;
  // Above is: @property (nonatomic, assign) MKCoordinateRegion mapRegion;

  BOOL didRegionChangeSignificantly = [MKRegionUtilities isRegion:region1 significantlyDifferentFromRegion:region2];
  if (didRegionChangeSignificantly) [self fetch];
}
4

0 回答 0