tags:

views:

10

answers:

0

Hi guys,

I need a help from ur side.As I ama making the spin action for the component picker it was spinning when I tapped the spin button but it was slow,I need to make the spin fast for 5 seconds and slowly it rests to it position.can anyone help to get this one.

My code for spin action is:

-(void)SpinAction
{
BOOL win = NO;
int numInRow = 1;
int lastValue = -1;
for(int i = 0;i < 5;i++)
{
    int newValue = random() % [self.column1 count];
    if(newValue == lastValue)
        numInRow++;
    else
        numInRow = 1;
    lastValue = newValue;
    [picker selectRow:newValue inComponent:i animated:YES];
    [picker reloadComponent:i];
    if(numInRow >= 3)
    {
        win = YES;
    }

}
if(win == YES)
{
    winLabel.text = @"!!!You Won!!!";
}
else
{
    winLabel.text = @"";
}
}

Thanks in Advance, Monish.