IOS开发6----UIScrollView的使用及经过按钮实现滑页

2.使用按钮实现滑页spa

//左滑io

- (IBAction)prevBtnTouch:(UIButton *)sender {im

    current = current - 1;next

    CGPoint point = CGPointMake(menuScrollView.frame.size.width * current - menuScrollView.frame.size.width, 0);img

    [menuScrollView setContentOffset:point animated:YES];animate

}poi

//右滑

- (IBAction)nextBtnTouch:(UIButton *)sender {

    CGPoint point = CGPointMake(menuScrollView.frame.size.width * current, 0);

    [menuScrollView setContentOffset:point animated:YES];

    current = current + 1;

}

相关文章
相关标签/搜索