我試圖使用網頁控制功能,以沿的UIScrollView顯示一組對我的iOS應用程序的圖片,我已經看到了一些教程,但他們都展示瞭如何改變顏色,我怎麼能有一些加載圖像並使用頁面控制來通過它們?UIPagecontrol與圖片
回答
使用的PageControl,您可以通過視圖導航,所以你可以把視圖imageviews和imageviews設置的圖像。
-(void)loadScrollViewWithPage:(int)page;
{
UIImageView *img=[[UIImageView alloc]initWithFrame:CGRectMake(scrollView.frame.size.width*page, 200, scrollView.frame.size.width, 100)];
img.image=[UIImage imageNamed:[viewControllers objectAtIndex:page]];
[scrollView addSubview:controller.view];
}
viewControllers
存儲您拍攝的圖像的名稱。
不錯,但我如何添加圖像名稱...對不起,我對所有這一切都是新的 – XpApp 2012-09-05 10:51:14
不久後生病接下來的幾天教程就會給你提供教程的鏈接。 – 2012-09-06 05:36:07
[http://abhilashreddykallepu.wordpress.com/2012/09/07/scrolling-images-on-a-scrollview/] – 2012-09-07 12:47:24
- 1. uipagecontrol使用IB只顯示圖片
- 2. UIViews與UIPageControl
- 3. UIPageControl與Xcode 5/iOS7中的圖像
- 4. 無UIPageControl視圖子視圖
- 5. UIScrollView與UITableViewCell中的UIPageControl
- 6. 與UIPageControl結合的UIPageController?
- 7. UIPageControl渲染與UIScrollView怪癖
- 8. 修復UIPageControl(不是幻燈片)
- 9. UIPageControl + UIAppearance
- 10. Uipagecontrol animation
- 11. UIScrollView作爲子視圖添加UIViewController?與UIPageControl
- 12. 與base64,圖片
- 13. 與圖片
- 14. 與圖片
- 15. apprequest與圖片?
- 16. UIPageControl與UIScrollView結合時不可見
- 17. 提取圖片從圖片框與handleref
- 18. 將圖片與圖片相比較
- 19. UIPageControl with UICollectionView/TableView
- 20. UIPageControl消失
- 21. UIPageControl with UITableView
- 22. UIPageControl - iPhone開發
- 23. UIPageControl不顯示
- 24. UIpagecontrol android系統
- 25. 使用UIpageControl
- 26. UIPageControl定製
- 27. UIPageControl問題
- 28. UIPageControl with scrollview
- 29. WatchKit UIPageControl Dot Color
- 30. UIScrollView-UIPageControl動畫
但你如何瀏覽我認爲他們只是使用背景顏色的示例 – XpApp 2012-07-12 12:16:52