Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDCycleScrollView 加一个滚动到某一页属性 #86

Open
zdrjson opened this issue Nov 24, 2015 · 2 comments
Open

SDCycleScrollView 加一个滚动到某一页属性 #86

zdrjson opened this issue Nov 24, 2015 · 2 comments

Comments

@zdrjson
Copy link

zdrjson commented Nov 24, 2015

No description provided.

@Marviszhao
Copy link

遇到同样的需求,需要控制切换到某一页,求解决!

@fujl
Copy link

fujl commented Mar 3, 2016

#pragma mark - public actions

  • (void)scrollToIndex:(int)index
    {
    CGFloat x = self.mainView.sd_width*index;
    [_mainView setContentOffset:CGPointMake(x, _mainView.contentOffset.y)];
    UIPageControl *pageControl = (UIPageControl *)_pageControl;
    pageControl.currentPage = index;
    }

就可以解决了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants