我正在尝试在iOS 7中构建一个cocos2d应用程序,但我遇到了一些问题。
[string drawInRect:drawArea withFont:uifont lineBreakMode:linebreaks[definition.lineBreakMode] alignment:alignments[definition.alignment]];
警告:'drawInRect:withFont:lineBreakMode:alignment:'在iOS 7中已弃用 - 使用-drawInRect:withAttributes:
CGSize boundingSize = CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX);
CGSize dim = [string sizeWithFont:uifont
constrainedToSize:boundingSize
lineBreakMode:NSLineBreakByWordWrapping];
警告:'sizeWithFont:constrainedToSize:lineBreakMode:'在iOS 7.0中已弃用 - 使用-boundingRectWithSize:options:attributes:context:
AudioSessionGetProperty (kAudioSessionProperty_OtherAudioIsPlaying, &varSize, &isPlaying);
警告:不推荐使用'AudioSessionGetProperty':首先在iOS 7.0中弃用
director_.wantsFullScreenLayout = YES;
警告:不推荐使用'wantsFullScreenLayout':首先在iOS 7.0中弃用
-(void) setAccelerometerEnabled:(BOOL)enabled
{
if( enabled != _accelerometerEnabled ) {
_accelerometerEnabled = enabled;
if( _isRunning ) {
if( enabled )
[[UIAccelerometer sharedAccelerometer] setDelegate:(id<UIAccelerometerDelegate>)self];
else
[[UIAccelerometer sharedAccelerometer] setDelegate:nil];
}
}
}
-(void) setAccelerometerInterval:(float)interval
{
[[UIAccelerometer sharedAccelerometer] setUpdateInterval:interval];
}
警告:'UIAccelerometer'已被弃用:iOS 5.0中首先弃用 - UIAccelerometer已被CoreMotion框架取代
有人可以帮助我解决这些问题吗?