2011-03-01 61 views
0

我在我的iPhone应用程序中使用Wikitude API。 但是,在运行应用程序时,我收到以下警告,并且在发出此警告时,我无法触摸屏幕上的任何POI。 警告是“CoreAnimation:忽略异常:CALayer位置包含NaN:[nan nan]” 请给我建议一些东西来克服这个警告。如何在iPhone应用程序中实现Wikitude API时克服CoreAnimation警告?

我使用下面的代码

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]; 
} 

在此先感谢

+0

我也有以下的问题我一个似乎发生后,我一直在重新安装应用程序上,我的iPhone测试设备... – user645168 2011-03-04 17:27:20

回答

0

我也有以下的问题我一个似乎发生后,我一直在重新安装到我的iPhone测试装置的应用...

尝试以下操作:

极限名大约25个字符 限制描述250个字符 图标,缩略图要小的50x50去在60X60引起了我的情况下,同样的错误....

例如::

WTPoi* poi25 = [[WTPoi alloc] initWithName:@"Car park: amwell street" AndLatitude:51.52899377167962 AndLongitude:-0.11010333895683289]; 
poi25.icon = @"http://img560.imageshack.us/img560/9931/parking.png"; 
poi25.shortDescription = @"Open Monday to Friday 6:30 to 7pm. Tariff plan range from £5"; 
poi25.thumbnail = @"http://img560.imageshack.us/img560/9931/parking.png"; 
+0

这个人是不是为我工作 – Shashank 2011-03-08 14:36:03

+0

你碰巧是越狱!这个错误真的很奇怪,只有当它发生时,我才会发生正常情况,我把它放在飞机模式上再次启动应用程序,它消失了! – user645168 2011-03-08 23:51:17

相关问题