Я сделал «Построить и проанализировать» в xCode и получить «Разыменование нулевого указателя». Я отметил в своем коде ниже, для какой строки я получаю сообщение. Я разрабатываю для iPhone.
"PDFScrollView.h"
#import "ENsightAppDelegate.h"
@interface PDFScrollView : UIScrollView <UIScrollViewDelegate> {
ENsightAppDelegate *appDelegate;
}
@end
"PDFScrollView.m"
- (id)initWithFrame:(CGRect)frame
{
if ((self = [super initWithFrame:frame])) {
// Set up the UIScrollView
self.showsVerticalScrollIndicator = NO;
self.showsHorizontalScrollIndicator = NO;
self.bouncesZoom = YES;
//self.decelerationRate = UIScrollViewDecelerationRateFast;
self.delegate = self;
[self setBackgroundColor:[UIColor grayColor]];
self.maximumZoomScale = 5;//200
self.minimumZoomScale = 0.5;//.85
self.userInteractionEnabled = YES;
self.delaysContentTouches = YES;
self.canCancelContentTouches = NO;
}
appDelegate =(ENsightAppDelegate *) [[UIApplication sharedApplication] delegate];
pdfView=[appDelegate GetLeaveView];
[self addSubview:pdfView];
return self;
}
Это не полный код, вставлено то, что я считаю полезным.
Я нахожу это довольно странным. Почему я получил это сообщение?
