I want to scroll the line (uiview - Hieght=1) between the button And i had put the button in container view of pageviewcontroller.Pageviewcontroller is starting from bottom of the buttons .I want the line to move when i scroll pageviewcontrollers subviews.
The Image as shown below...
[![enter image description here](https://i.stack.imgur.com/ZWUcE.png)](https://i.stack.imgur.com/ZWUcE.png)

So this line white line I want to move when I scroll page 1 to 2 then 2 - 1 How can i do this Please help....
As I have to use pageviewcontroller
['https://Stackoverflow.com/questions/35294871', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5750980/']
you can do this in with help of `UIScrollView` , in here no need of `UIpageViewController`

take the delegate methods of 

```
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView;
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate;
- (void)scrollViewDidScroll:(UIScrollView *)sender;

```

**Step-1**

create the one scrollView like `self.tblScroll`

```
//It call end of scroll

- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
if (scrollView != MovemylineinBlack && scrollView != MovemylineinRed)
{
    int x=fmod(scrollView.contentOffset.x, self.tblScroll.frame.size.width);
    if (x <= self.tblScroll.frame.size.width/2 )
    {
        [scrollView setContentOffset:CGPointMake(scrollView.contentOffset.x-x, scrollView.contentOffset.y) animated:YES];
    }
    else
    {
        [scrollView setContentOffset:CGPointMake(scrollView.contentOffset.x+self.tblScroll.frame.size.width-x, scrollView.contentOffset.y) animated:YES];
    }
   }
}

```

**Step-2**

// it s call your scroll is closusre

```
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate: (BOOL)decelerate
{
if (scrollView != MovemylineinBlack && scrollView != MovemylineinRed)
{
    int x=fmod(scrollView.contentOffset.x, self.tblScroll.frame.size.width);
    if (x <= self.tblScroll.frame.size.width/2 )
    {
        [scrollView setContentOffset:CGPointMake(scrollView.contentOffset.x-x, scrollView.contentOffset.y) animated:YES];
    }
    else
    {
        [scrollView setContentOffset:CGPointMake(scrollView.contentOffset.x+self.tblScroll.frame.size.width-x, scrollView.contentOffset.y) animated:YES];
    }
   }
 }

```

**Step-3**

// Imeplement the every drag of move capture method

```
- (void)scrollViewDidScroll:(UIScrollView *)sender
{
  if (self.tblScroll.contentOffset.x<KAPPDeviceWidth/2) // KAPPDeviceWidth--> this is your view Width
{
    self.viewSubBack.frame=CGRectMake(self.tblScroll.contentOffset.x, 106, 160, 5); // viewSubBack --> is your white line
}
else
{
    self.viewSubBack.frame=CGRectMake((KAPPDeviceWidth/2)+1, 106, 160, 5);
}
}

```
This project will let you integrate this need
 <https://github.com/hightower/HTHorizontalSelectionList>