本文介绍了在iPhone应用程序中实现Wikitude API时如何克服CoreAnimation警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am using the Wikitude API in my iPhone app.But while running the application i am getting the following warning and on coming of this warning i am not able to touch any POIs on the screen.The warning is "CoreAnimation: ignoring exception: CALayer position contains NaN: [nan nan]"Please suggest me something to overcome this warning.

我正在使用以下代码

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

预先感谢

推荐答案

请尝试新版本的Wikitude iPhone API,该API应该可以解决上述问题。您可以从

Please try the new version of the Wikitude iPhone API which should fix the described issue. You can download it from http://www.wikitude.org/developers

干杯,尼古拉斯

这篇关于在iPhone应用程序中实现Wikitude API时如何克服CoreAnimation警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-19 03:34