您的位置:首页 > 其它

左右移动线条

2015-10-10 13:54 267 查看
-(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];
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: