앱을 설치했습니다. iOS 4.2에서는지도가 작동하지만이 앱은 ios 3.2에서 작동이 중단됩니다. 무엇을 할 수 있습니까?UIMapkit 구현 문제
수입 "customAnnotation.h"
@implementation의 customAnnotation 는, 좌표 @synthesize은 titleText, subtitletext;
- (ID) initWithCoordinate (CLLocationCoordinate2D) 좌표 {
coordinate = coords;
NSLog(@"%f,%f",coords.latitude,coords.longitude);
return self;
}
- (는 NSString *) 자막 { 복귀 self.subtitletext; }
- (NSString *) title { return self.titletext; }
- (무효) setTitle이라는 (는 NSString *) strTitle {
self.titletext = strTitle;
}
- (무효) setSubTitle (는 NSString *) strSubTitle {
self.subtitletext = strSubTitle;
}
- (void) dealloc { [titletext release]; [subtitletext release]; [super dealloc];
} 사용자 정의 주석 클래스
@end
는
및 기타 클래스 코드는 여기
MapExampleViewController
@implementation
수입 "MapExampleViewController.h"입니다 - (무효) c reateAnnotationWithCoords : (CLLocationCoordinate2D) 좌표 {
customAnnotation *annotation = [[customAnnotation alloc] initWithCoordinate:coords];
//annotation.title = @"Gandhinagar";
//annotation.subtitle = @"Indroda Park";
[annotation setTitle:@"Main Title"];
[annotation setSubTitle:@"Sub Title"];
[myMapView addAnnotation:annotation];
[annotation release];
}
//은 일반적으로 코코아 콩,보기를로드 한 후 추가 설정을 할 수있는 viewDidLoad를 구현합니다. - (무효) viewDidLoad에 내가 응용 프로그램을 설치입니다 {
[super viewDidLoad];
myMapView = [[MKMapView alloc] initWithFrame:[self.view bounds]];
CLLocationCoordinate2D coords = CLLocationCoordinate2DMake(23.216667, 72.683333);
float zoomLevel = 0.2;
MKCoordinateRegion region = MKCoordinateRegionMake(coords, MKCoordinateSpanMake(zoomLevel, zoomLevel));
[myMapView setRegion:[myMapView regionThatFits:region] animated:YES];
myMapView.delegate = self;
[self createAnnotationWithCoords:coords];
[self.view addSubview:myMapView];
}
. "EXC_BAD_ACCESS": IOS 3.2이 다음 오류
아래에 제공 [11779 스레드로 전환] 적용 부하는-규칙 sharedlibrary 모든 이 프로그램 신호를 받아 계속 [11779이 스레드로 전환]. 경고 : check_safe_call는 : check_safe_call : 현재 프레임을
경고를 복원 할 수있는 이전에 선택한 프레임을 복원 할 수 없습니다 : 현재 프레임을
경고를 복원 할 수 있습니다. 경고 : check_safe_call : 현재 프레임을 복원 할 수 없습니다.
경고 : 이전에 선택한 프레임을 복원 할 수 없습니다. 경고 : 이전에 선택한 프레임을 복원 할 수 없습니다. 경고 : 이전에 선택한 프레임을 복원 할 수 없습니다. 가
을 종료 죽일디버거는 상태 0 (GDB) 도와주세요와 함께 종료되었습니다! 감사합니다.
충돌 로그 및 관련 코드를 게시하십시오 ... – Jhaliya
장치에서 로그를 추가하십시오. –