-(void)segmentedAction:(id)sender{
[UIImageView beginAnimations:@"anim" context:NULL];
[UIImageView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIImageView setAnimationBeginsFromCurrentState:YES];
[UIImageView setAnimationDuration:0.5];
CGRect listFrame = CGRectMake(0.0f, 0.0f, 0.0f, 0.0f);
UISegmentedControl *control = (UISegmentedControl *)sender;
switch (control.selectedSegmentIndex) {
case 0:
status = 2;
listFrame = CGRectMake(0.0f, 44.0f, 80, 0.5f);
break;
case 1:
status = 1;
listFrame = CGRectMake(80.0f, 44.0f, 80, 0.5f);
break;
case 2:
status = 3;
listFrame = CGRectMake(160.0f, 44.0f, 80, 0.5f);
break;
case 3:
status = 4;
listFrame = CGRectMake(240.0f, 44.0f, 80, 0.5f);
break;
default:
break;
}
lineView.frame = listFrame;
[UIImageView commitAnimations];
[self requestListWithStatus];
}