Search code examples
iosobjective-cuiscrollviewxamarin.iosuipagecontrol

How can I implement sliding between pages in iOS with titles like ViewPager with ViewPagerIndicator in Android?


We have an Android app using ViewPager and ViewPagerIndicator where you can scroll the content and the title scrolls, but the next and previous title is visible as well on the current page. How can this be implemented in iOS?

Currently we have a UIScrollView where you can scroll between the pages and with a segmentcontrol on top. This works well for max 4 pages, but we need to remove the segmentcontrol and replace it with a titlestrip to make room for more pages.

Android example: http://blog.pboos.ch/post/40575809334/android-pagertabstrip-viewpager

iOS app that has such an implementation:

enter image description here


Solution

  • I managed to solve this using two UIScrollViews. In the scrolled event of the content scrollview I moved the title scrollview with 0.5*offset of the title scrollview. That resulted in the effect i wanted.