0

I am wondering if there is some way to replicate Safari (on the iPhone's) tab behavior of scrolling through the webpages. Is it an API or some code that makes this happen, and how would I create this in my own app? I saw this post: UIScrollView horizontal paging like Mobile Safari tabs however I have not been able to follow the steps that the answer provided.

Thanks for any help!

EDIT: I have found the Apple Example called PageControl and have slightly modified it to display a small jpg instead of the colors. However, this lags a lot on scroll - So now my question is more if there is any way to make it not lag. Maybe some IB Preference that I missed transferring or a different file format?

Community
  • 1
  • 1
individualtermite
  • 3,615
  • 16
  • 49
  • 78

2 Answers2

2

You should use png files, they are optimized for iphone.

willi
  • 6,559
  • 4
  • 30
  • 27
0

Are you loading the images off screen?

The key is to only update the views +1 and -1 and to remove any views that are further away. Matt Gallagher did a nice write up of this:

http://cocoawithlove.com/2009/01/multiple-virtual-pages-in-uiscrollview.html

That should make your Scroll view screaming fast.

Corey Floyd
  • 25,929
  • 31
  • 126
  • 154