#22 Coding without storyboard

突然心血來潮,把自己的1A2B小遊戲改成純程式碼的方式去寫。

依照網路上的文一步驟一步驟移除storyboard,

然後修改sceneDelegate

(參照上連結,Using Scene Delegate With Storyboards)

完成後,UIScreen.main.bounds卻一直呈現比手機螢幕還小的狀況,

print的長寬分別是 480 x 320,一直找不到原因是什麼。

google 後,有很多人遇到這個問題,是因為plist裡面失去了原本的storyboard,造成xcode無法獲取設備大小,他就會被鎖定在480x320的最小畫面。

參考彼得潘文章完成設定,終於成功建立純程式的swift 環境。

--

--

--

Wish me luck on the way become iOS app developer!

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Stephen Huang

Stephen Huang

Wish me luck on the way become iOS app developer!

More from Medium

The Best Tutorial For Starting Learning iOS Development

Become an iOS dev in 2022. Part 1: Starting with Swift

Functions(Swift)

Becoming a Swift Developer (Week 3)