UIScrollView custom paging size

后端 未结 11 1513
走了就别回头了
走了就别回头了 2020-12-07 11:49

paging in UIScrollView is a great feature, what I need here is to set the paging to a smaller distance, for example I want my UIScrollView to page less size that the UIScrol

11条回答
  •  不思量自难忘°
    2020-12-07 12:25

    I had the same problem so I have made a custom UIScrollView. It's available on Github now because when I searched I didn't find any solutions like this. Enjoy! https://github.com/MartinMetselaar/MMCPSScrollView

    MMCPSScrollView* scrollView = [[MMCPSScrollView alloc] initWithFrame:self.view.bounds];
    [scrollView setType:MMCPSScrollVertical];
    [scrollView setPageHeight:250];
    [scrollView setPageSize:2];
    [self.view addSubview:scrollView];
    

    If you have any further questions about this component, just ask.

提交回复
热议问题