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

在 ViewDidLoad 上執(zhí)行 Segue

Perform Segue on ViewDidLoad(在 ViewDidLoad 上執(zhí)行 Segue)
本文介紹了在 ViewDidLoad 上執(zhí)行 Segue的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

限時送ChatGPT賬號..

在 iOS 5 中,我有一個帶有模式視圖控制器的 Storyboard,如果它是用戶第一次使用應(yīng)用程序,我想顯示它,之后我想跳過這個視圖控制器.

In iOS 5 I have a Storyboard with a modal view controller, that I would like to display if its the user's first time in the app, after that I would like to skip this view controller.

我設(shè)置了一個 NSDefault 鍵來處理這個問題,但是當(dāng)我檢查它是否已設(shè)置然后使用 performSegueWithIdentifier 啟動 segue 時,沒有任何反應(yīng).如果我把這個 segue 放在一個按鈕后面,它就可以正常工作......

I set an NSDefault key to handle this but when I check to see if this is set and then use performSegueWithIdentifier to initiate the segue, nothing happens. If i put this segue behind a button it works fine...

推薦答案

我回答了一個類似的問題,開發(fā)人員希望在開始時顯示登錄屏幕.我為他整理了一些示例代碼,可以在這里下載.解決這個問題的關(guān)鍵是在正確的時間調(diào)用東西,如果你想顯示這個新的視圖控制器,你會在例子中看到你必須使用這樣的東西

I answered a similar question where the developer wanted to show a login screen at the start. I put together some sample code for him that can be downloaded here. The key to solving this problem is calling things at the right time if you want to display this new view controller, you will see in the example you have to use something like this

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
    UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"LoginViewController"];
    [vc setModalPresentationStyle:UIModalPresentationFullScreen];

    [self presentModalViewController:vc animated:YES];
}

我還對轉(zhuǎn)場和故事板的工作原理進行了說明,您可以在此處

I also have an explanation of how segues and storyboards work that you can see here

這篇關(guān)于在 ViewDidLoad 上執(zhí)行 Segue的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關(guān)文檔推薦

Using Instruments to test an iOS app without having source code to the application(在沒有應(yīng)用程序源代碼的情況下使用 Instruments 測試 iOS 應(yīng)用程序)
KIF: How to auto-run/stress test an iOS app to find the cause of a rare UI bug?(KIF:如何自動運行/壓力測試 iOS 應(yīng)用程序以找出罕見 UI 錯誤的原因?)
Can#39;t change target membership visibility in Xcode 4.5(無法更改 Xcode 4.5 中的目標(biāo)成員身份可見性)
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 消失了)
主站蜘蛛池模板: 日韩视频精品 | www.se91| 国产黄色在线观看 | 国产精品久久久久久久久久久免费看 | 国产午夜精品视频 | 国产h在线 | 亚洲成人免费观看 | 国产成人精品在线播放 | 国产精品久久久久国产a级 欧美日韩国产免费 | 亚洲欧美日韩久久久 | 成人免费共享视频 | av天空| 91精品国产综合久久福利软件 | 亚洲人人 | 日韩中出| 国产成人福利 | 国产精品久久久久久久久久了 | 中文区中文字幕免费看 | 国产极品91 | 欧美精品国产精品 | 午夜天堂精品久久久久 | 久草热视频 | 国产精品特级毛片一区二区三区 | 免费精品 | 一级a爱片性色毛片免费 | 日韩欧美国产电影 | 中文字幕av亚洲精品一部二部 | 欧美精品日韩 | 欧美激情久久久 | 国产精品国产精品国产专区不卡 | 国产高潮好爽受不了了夜夜做 | 另类一区 | www.午夜 | 超碰人人人 | www日本高清 | 四虎成人在线播放 | 日本精品一区二区三区在线观看 | 毛片视频网站 | 国产99视频精品免费视频7 | 国产一区二区三区四区区 | 人妖videosex高潮另类 |