NSTimer *timer;
int ComponentNumber;
//Put this line into your viewDidLoad
ComponentNumber=0;
timer = [NSTimer scheduledTimerWithTimeInterval:3.0 target:self selector:@selector(ChangeComponentNumber) userInfo:nil repeats:YES]; -(void)ChangeComponentNumber
{
if(ComponentNumber>8)
{
[timer invalidate];
return;
}
else if(ComponentNumber==4)
{
ComponentNumber=ComponentNumber+1;
[self performSelector:@selector(HidePickerComponents) withObject:nil afterDelay:0.0];
}
else
{
[self performSelector:@selector(HidePickerComponents) withObject:nil afterDelay:0.0];
}
}
-(void)HidePickerComponents
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:AlarmSoundPicker cache:YES];
[(UIView*)[[AlarmSoundPicker subviews] objectAtIndex:ComponentNumber] setHidden:YES];
[UIView commitAnimations];
ComponentNumber=ComponentNumber+1;
}
1 comment:
Hi,
Do u have any sample on uipickerview which inserts values from sqlite database to uipickerview.
A m searching this from a week
Thank u
Post a Comment