4

I need to provide paging in scrollview with different page size, each page will be of different size, whenever I scroll down or up it should show next page in the screen, and if the page size can not fit in single screen then it should allow further scrolling too till the end of that page. Here is the image for how i want to display data in two section.

See the below linked App in itunes for more clearity that how do I want the actual implementaiton.

https://itunes.apple.com/us/app/circa-news/id517114354

1

enter image description here

enter image description here

please help me some one how to do this. thanks in advance.

SJS
  • 2,647
  • 1
  • 17
  • 34
Dhaval H. Nena
  • 3,992
  • 1
  • 37
  • 50

2 Answers2

2

Follow this steps:-

  1. Download the page control source code from here https://github.com/yeahdongcn/RSCircaPageControl

  2. Import RSCircaPageControl.h to use the functionality.

  3. In the view where you want above layout,add above downloaded control as subview.

  4. Add scroll view as sub view of the page control,if your data content is more than visible area.

Explore the sample code how they have used, I guess this control fulfills all your requirements, RSCircaPageControl.h & RSCircaPageControl.m are main helper classes.

ALL THE BEST

Parvez Belim
  • 1,003
  • 13
  • 36
  • Thanks @Parvez for your help but in reference you have provided there is pages with same size, and in my case i need paging with different size. page size will be decided dynamically according to the content of page. – Dhaval H. Nena Dec 19 '13 at 10:03
  • add scroll view as subview to each page and in that take one label or whatever you need dynamically.Once finishing that set the ContentSize of the scrollview added as subview according to the size of content. – Parvez Belim Dec 19 '13 at 10:16
  • brother I did it but paging is still not doing in the way which I want, when I scroll down or up it should stop at the Y position (start of any page) of current page. Can you please tell me how to do that paging ? Much appreciated if it works. – Dhaval H. Nena Dec 19 '13 at 11:18
  • Use setExclusiveTouch property of UIView. For Example:-to set the exclusive touch use... [self.view setExclusiveTouch:YES]; [pageControlScrollview setExclusiveTouch:YES]; [scrInnerview setExclusiveTouch:YES]; – Parvez Belim Dec 20 '13 at 12:33
  • @iOSbeginner I guess using above mentioned property you can sort out your issue. – Parvez Belim Dec 20 '13 at 12:41
0

You can use CSS for the same. From web service, you should need two predefined class name for which you will apply css. One css to give white background and border and another class for grey font.

spaleja
  • 1,435
  • 15
  • 24