久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

是否可以在 UIPageViewController 中以編程方式翻頁

Is it possible to Turn page programmatically in UIPageViewController?(是否可以在 UIPageViewController 中以編程方式翻頁?)
本文介紹了是否可以在 UIPageViewController 中以編程方式翻頁?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

UIPageViewController中是否可以通過編程方式翻頁?

Is it possible to turn page programmatically in UIPageViewController?

推薦答案

是的,方法是可以的:

- (void)setViewControllers:(NSArray *)viewControllers 
                 direction:(UIPageViewControllerNavigationDirection)direction 
                  animated:(BOOL)animated 
                completion:(void (^)(BOOL finished))completion;`

這與在頁面上設置第一個視圖控制器的方法相同.類似的,你可以用它去其他頁面.

That is the same method used for setting up the first view controller on the page. Similar, you can use it to go to other pages.

想知道為什么 viewControllers 是一個數組,而不是單個視圖控制器嗎?

Wonder why viewControllers is an array, and not a single view controller?

這是因為頁面視圖控制器可能有一個脊椎"(就像在 iBooks 中一樣),一次顯示 2 頁內容.如果您一次顯示 1 頁內容,則只需傳入一個 1 元素數組.

That's because a page view controller could have a "spine" (like in iBooks), displaying 2 pages of content at a time. If you display 1 page of content at a time, then just pass in a 1-element array.

Swift 中的一個例子:

An example in Swift:

pageContainer.setViewControllers([displayThisViewController], direction: .Forward, animated: true, completion: nil)

這篇關于是否可以在 UIPageViewController 中以編程方式翻頁?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯(lián)網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

相關文檔推薦

Using Instruments to test an iOS app without having source code to the application(在沒有應用程序源代碼的情況下使用 Instruments 測試 iOS 應用程序)
KIF: How to auto-run/stress test an iOS app to find the cause of a rare UI bug?(KIF:如何自動運行/壓力測試 iOS 應用程序以找出罕見 UI 錯誤的原因?)
Can#39;t change target membership visibility in Xcode 4.5(無法更改 Xcode 4.5 中的目標成員身份可見性)
UITableView: Handle cell selection in a mixed cell table view static and dynamic cells(UITableView:在混合單元格表視圖靜態(tài)和動態(tài)單元格中處理單元格選擇)
How to remove Address Bar in Safari in iOS?(如何在 iOS 中刪除 Safari 中的地址欄?)
iOS 5 SDK is gone after upgrade to Xcode 4.5(升級到 Xcode 4.5 后,iOS 5 SDK 消失了)
主站蜘蛛池模板: 北条麻妃99精品青青久久主播 | www.亚洲 | 亚洲人成网亚洲欧洲无码 | 亚洲免费婷婷 | 拍真实国产伦偷精品 | 一级片在线视频 | 日干夜干 | 亚洲国产精品一区二区久久 | 日韩欧美在线观看 | 91视频进入 | 日韩a视频| 国产一级网站 | 艹逼网 | 婷婷桃色网 | 色综合久久天天综合网 | 久久精品二区亚洲w码 | 国产精彩视频 | 日日操操| 成人欧美一区二区三区在线播放 | 日韩一级不卡 | 国产精品美女一区二区三区 | 国产四虎| 婷婷色综合 | 欧美日韩高清在线一区 | 日日夜夜天天 | 国产激情精品视频 | 欧美国产亚洲一区二区 | 一区二区三区亚洲 | 天天操妹子 | 综合精品 | 日本精品一区二区三区视频 | 中文字幕在线一区 | 欧美性猛交 | 久久久综合网 | 亚洲a一区二区 | 亚洲最大福利网 | 一区二区三区四区国产 | 亚洲成人精品 | 日韩精品一区二区三区免费观看 | 国产高清精品一区 | 久久ww|