いくつかのカスタムロケーションを表示するMKMapViewがあります。私は戻るボタンを押すまですべてがうまく動作します。iOS MKMapViewの問題
SearchViewControllerは私のクラス名です。時には
私が取得:
[SearchViewController respondsToSelector:]: message sent to deallocated instance 0x73495f0
その他の回:
[SearchViewControllerのMapView:regionDidChangeAnimated:]:
:メッセージがインスタンスに0x7343f20
または割り当て解除する を送りました
[SearchViewController mapView:didUpdateUserLocation:]: message sent to deallocated instance 0x7343f20
These functions are :
-(void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation
{
MKCoordinateRegion mapRegion;
mapRegion.center = mapViewHandler.userLocation.coordinate;
mapRegion.span.latitudeDelta = 0.2;
mapRegion.span.longitudeDelta = 0.2;
[mapViewHandler setRegion:mapRegion animated: YES];
}
- (void)mapView:(MKMapView *)mapView didDeselectAnnotationView:(MKAnnotationView *)view
{
//do nothing
}
これは通常、私が視界に入ってすぐに戻ったときに起こります。
このバグを取り除く手助けをしてもらえますか? .xib
ファイルでmapViewHandler
を作成し、viewDidLoad()
メソッドで[self.mapViewHandler setDelegate:self];
を使用しました。 私は戻るボタンを押してこのビューを離れると、すべてのロード(要求など)からすべてを停止する方法はありますか?あなたは、「戻る」とき