首先創建水平視圖,然後您加載文檔這查看..然後你就可以水平滾動....
UIScrollView *scroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
scroll.pagingEnabled = YES;
NSInteger numberOfViews = 3;
for (int i = 0; i < numberOfViews; i++) {
CGFloat yOrigin = i * self.view.frame.size.width;
UIView *awesomeView = [[UIView alloc] initWithFrame:CGRectMake(yOrigin, 0, self.view.frame.size.width, self.view.frame.size.height)];
awesomeView.backgroundColor = [UIColor colorWithRed:0.5/i green:0.5 blue:0.5 alpha:1];
[scroll addSubview:awesomeView];
[awesomeView release];
}
scroll.contentSize = CGSizeMake(self.view.frame.size.width * numberOfViews, self.view.frame.size.height);
[self.view addSubview:scroll];
[for more details][1]
[1]: http://idevzilla.com/2010/09/16/uiscrollview-a-really-simple-tutorial/
感謝SAURABH您的回覆,但如果我必須通過編程方式顯示頁面的頁面加載PDF如何將我通過他們水平滾動。 – Rishi 2011-04-05 05:30:56
請編輯你的問題這個...現在你的問題沒有完全描述你的問題! – Saurabh 2011-04-05 05:34:48