开发者

How to build a USAToday type app? Horizontal and Vertical scroll control

开发者 https://www.devze.com 2023-01-31 22:34 出处:网络
I am trying to build an app similar to USAToday i.e. each \"article\" is a mix of images and text that the user scrolls vertically to read if it covers more than than the size of the screen.Scrolling

I am trying to build an app similar to USAToday i.e. each "article" is a mix of images and text that the user scrolls vertically to read if it covers more than than the size of the screen. Scrolling horizontally brings up the next article and so on.

Each article should have "paging enabled" so that the content moves as if you are turning a page in a book wheth开发者_Go百科er you are moving vertically or horizontally.

I must have looked at every tutorial for Scroll and Page navigation, but I am drawing a blank. Any help is much appreciated.

BTW: I have down loaded this tutorial....

http://www.edumobile.org/iphone/iphone-programming-tutorials/pagecontrol-example-in-iphone/

... but (a) it builds ok but simulator only shows a featureless black screen, and I cannot work out how to correct it, and (b) it only scrolls horizontally.


The sample code that you reference is old so I think something has changed in the SDK since then. I was able to at least get the code to run by changing the MainWindow.xib file. I opened that file in Interface Builder and then selected the Window and then in the Window Attributes Inspector I ticked "Visible at Launch". Then the tutorial would at least run and show the colors. I think you might find that there are more issues with it though.

When you are wanting to page something, the real trick is setting the content size of the scroll view.

This StackOverflow question has some good information that might help you get going.

0

精彩评论

暂无评论...
验证码 换一张
取 消