Is there any way to use storyboard and SwiftUI in same iOS Xcode project?

后端 未结 5 1251
有刺的猬
有刺的猬 2020-12-13 06:58

As Swift 5 introduces the SwiftUI framework for creating the views, but we are currently using the storyboard for UI design.

So I just wanted to know the procedure t

5条回答
  •  感情败类
    2020-12-13 07:17

    You can use both in the same project without a problem.

    SwiftUI is just a framework. You can create one ViewController with SwiftUI and another one with the storyboard. The choice is yours.

    Just import SwiftUI where you want to use it

提交回复
热议问题