开发者

how to declare NSOrderedDecending

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜