I have implemented a PDF reader application in which i want to implement paging. How can I implement this? Please开发者_如何学编程 advise me.
I'd use a UIScrollView that is big enough to contain all the pages. Enable paging.
In your UIScrollViewDelegate, when -scrollViewDidScroll: gets called, figure out which pages are currently visible. If a new page comes into sight, add a custom UIView to the scroll view at the right position that uses CGContextDrawPDFPage to draw the PDF page.
Make sure to remove views from the scroll view that scroll out of sight to free up memory.
精彩评论