我想要app啟動的時候,判斷是否第一次使用app
如果是第一次使用,會跳到設定的ViewController
設定完之後跳到Main Interface的Entry ViewController
如果已經執行設定過,直接跳到Main Interface的的Entry ViewController
目前想法是在Launch Screen加判斷,
可是LaunchScreen.storyboard似乎不能設定他的UIViewController?
一直出現"Launch screens may not set custom classnames"
請問功能要怎麼設計?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 61.66.243.96
※ 文章網址: https://www.ptt.cc/bbs/MacDev/M.1476862594.A.772.html
推
10/19 16:00, , 1F
10/19 16:00, 1F
推
10/19 16:03, , 2F
10/19 16:03, 2F
→
10/19 16:03, , 3F
10/19 16:03, 3F
推
10/19 16:32, , 4F
10/19 16:32, 4F
謝謝你的回覆^^
我參考link內的code
如果在AppDelegate用
window?.rootViewController = BViewController()
可以呈現設定畫面,但是設定完之後無法關閉它回到MainViewController
在MainViewController的viewDidLoad()加入判斷然後show另外一個VC
出現錯誤
Warning: Attempt to present <BViewcontroller> on <MainViewController>
whose view is not in the windows hierarchy.
如果是加在MainViewController的viewDidAppear可以present設定畫面
但是會有一瞬間先看到MainViewController的畫面
有沒有比較順暢的做法?
※ 編輯: sdico (61.66.243.96), 10/20/2016 09:35:22
推
10/20 09:43, , 5F
10/20 09:43, 5F
→
10/20 09:47, , 6F
10/20 09:47, 6F
→
10/20 16:25, , 7F
10/20 16:25, 7F
→
10/20 16:26, , 8F
10/20 16:26, 8F