Saturday, 15 November 2014

In Horizontal Scrollview to Find a page using Page Controller

In ScrollView Settings, Tick the PagingEnabled Button.


ViewController.m File

-(void)scrollViewDidScroll:(UIScrollView *)scrollView
{
    int page = scroll.contentOffset.x / scroll.frame.size.width;
    page_controll.currentPage = page;
}

No comments: