top滚动
NSArray *btnTitArray = [NSArray arrayWithObjects:@"关注动态",@"宝贝上新",@"视频直播",@"排行榜", nil];
_moveView = [[UIView alloc]initWithFrame:CGRectMake(0, 64+48, WIDTH/4, 48)];
[self.view addSubview:self.moveView];
for (int i = 0; i< 4; i++) {
_btn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
if (i==0)
{
[_btn setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal];
}else{
[_btn setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
}
_btn.tag = 200 +i;
_btn.frame = CGRectMake(i*(WIDTH/4), 64, WIDTH/4, 48);
[_btn setTitle:[btnTitArray objectAtIndex:i] forState:UIControlStateNormal];
[_btn addTarget:self action:@selector(moveClick:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:self.btn];