开发者

how to declare NSOrderedDecending

开发者 https://www.devze.com 2022-12-18 08:24 出处:网络
static NSInteger shakeCount=0; static NSDate *shakeStart; static NSOrderedDecending; NSDate *now=[[NSDate开发者_StackOverflow中文版 alloc]init];
static NSInteger shakeCount=0;
static NSDate *shakeStart;
static NSOrderedDecending;

NSDate *now=[[NSDate开发者_StackOverflow中文版 alloc]init];
NSDate *checkDate=[[NSDate alloc] initWithTimeInterval:1.5f sinceDate:shakeStart];
if([now compare:checkDate]==NSOrderedDecending || shakeStart ==nil)
{
    shakeCount=0;
    [shakeStart release];
    shakeStart=[[NSDate alloc]init];
}
[now release];
[checkDate release];


if(fabsf(acceleration.x) > 2.0
    || fabsf(acceleration.y) > 2.0      
    || fabsf(acceleration.z) > 2.0)
{
    shakeCount++;
    if(shakeCount>4)
    {

        shakeCount=0;
        [shakeStart release];
        shakeStart =[[NSDate alloc]init];
    }
}
}

But getting error as "NSOrderedDecending not declare".


It's NSOrderedDescending, not NSOrderedDecending. Note deSCend vs. deCend

0

精彩评论

暂无评论...
验证码 换一张
取 消