2011-03-08 65 views
0

我目前正在iphone增強現實應用程序中,我已經添加poi在相機視圖,但我的應用程序崩潰和它的拋出異常(CALayer NAN 15)。 以下是我正在使用的代碼。維基應用程序崩潰(poi添加問題)iphone 4.0

wikitudeAR = [[WikitudeARViewController alloc] initWithDelegate:self applicationPackage:nil applicationKey:nil; applicationName:nil developerName:nil];  

- (void) verificationDidSucceed { 

id appDelegate=[[UIApplication sharedApplication]delegate]; 
UIWindow *window = [appDelegate window];  
[window addSubview:[wikitudeAR start]; 
} 
- (void) verificationDidFail { 

} 

- (void) didUpdateToLocation: (CLLocation*) newLocation 
      fromLocation: (CLLocation*) oldLocation { 

} 
-(void) APIFinishedLoading 
{  //arr is current location data 
NSMutableArray *addPOIData=[[NSMutableArray alloc]init]; 
for(int i=0;i<[arr count];i++) 
{ 
    NSDictionary *dict= [arr objectAtIndex:i]; 
    WTPoi* poi = [[WTPoi alloc] initWithName:currentMapLocation.locationTitle AndLatitude:[[dict objectforKey:@"lat"]doubleValue]AndLongitude:[[dict  objectforKey:@"long"]doubleValue]]; 
    poi.icon = @"http://img560.imageshack.us/img560/9931/parking.png"; 
poi.shortDescription = @"Open Monday to Friday 6:30 to 7pm. Tariff plan range from £5"; 
poi.thumbnail = @"http://img560.imageshack.us/img560/9931/parking.png"; 
    [addPOIData addObject: poi]; 
    [poi release]; 
} 
    [[WikitudeARViewController sharedInstance] addPOIs: addPOIData]; 
[addPOIData release]; 
} 

請幫助我。 在此先感謝。

回答