문제

I have an application with several (8) different Views in a UIScrollView. They are circling so that you get to the first when you try to get "behind" the last and vice versa. My problem is how to create a titlebar like in the Stream of the Google+ App. There the titles are circling with the pages and show the current visible page. How could I realize that? Would it be possible to create a general class to use such a view in many different apps?

I've already tried to solve this problem with some different approaches, but they all didn't work (well). I can display labels above my scrollView and move them, but how far and with which text seems to be difficult for me.

So now I'm looking forward to your answers ;D

도움이 되었습니까?

해결책

Try using two UIScrollView, one for the content and one for the headers. The header UIScrollView would be controlled by your view controller that is also a delegate of the main UIScrollView. Update the header UIScrollView whenever you receive a -scrollViewDidScroll: message from the main UIScrollView.

다른 팁

I think you need to add label in customview and then add customviews in scrollView, you will get events for individual view, so you can rotate that view according to angle and keep label at fix place...

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top