Ben bir iPhone Mapkit uygulaması için MKAnnotationView bir alt sınıfını oluşturmak çalışıyorum, ama nedense aniden bu sorunu yaşamaya devam ediyorum:
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
Bunlar benim başlık ve hataya neden gibi görünüyor kodu için ana dosyalarıdır. Hata özellikle bu dosya için görünmüyor olsa ben @end için @implementation dan .m dosyasını yorum yaparsanız, bu görünmüyor. Ben @implementation kendisi dahil değil uygulamada her şeyi açıklama olmadığı henüz Ancak görünmüyor.
PhotoAnnotationView.h
#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
@interface PhotoAnnotationView : MKAnnotationView {
UIImageView *thumb;
}
@property (nonatomic, retain) IBOutlet UIImageView *thumb;
@end
PhotoAnnotationView.m
#import PhotoAnnotationView.h
@implementation PhotoAnnotationView
@synthesize thumb;
- (id)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
// Initialization code
}
return self;
}
- (void)drawRect:(CGRect)rect {
// Drawing code
}
- (void)dealloc {
[super dealloc];
}
@end
Bu temelde aracılığıyla oluşturulan Xcode aynı kodudur New File... > Objective-C Class > Subclass of: UIViewalt sınıf değişti ile.
Ben Snow Leopard Xcode sürümünü 3.2.1 çalıştıran değilim.













