4 Replies
      Latest reply on Aug 30, 2019 2:39 PM by KMT
      helloworldchris Level 1 Level 1 (0 points)

        Hi guys,


        So now that SwiftUI is coming out in xCode 11.  Should we keep using storyboards and xib files going forward, or should we only use SwiftUI going forward, and eventually migrate storyboards over?  Will it be possible to configure projects to use SwiftUI as splash screen instead of having storyboard?  What about main.storyboard?


        Because now there are several ways of doing same thing, I'm assuming some of it is going to be deprecated in a long run?





        • Re: Storyboards deprecated w/ SwiftUI or not?
          Claude31 Level 8 Level 8 (7,895 points)

          SwiftUI is not replacing storyboards ; it may replace xib in some cases.


          But IMHO, SwiftUI is still far from providing the capabilities of xib. Just read in SwiftUI forum to see how developers are struggling to replicate what is easily done with xib and storyboards and autoLayout.


          In addition, I find SwiftUI verbose, with the succession of .attributes(). But that may be just a question of practice.


          So, I don't fear storyboards and xib to disappear in the next 5 years ; and I will keep using them.

          • Re: Storyboards deprecated w/ SwiftUI or not?
            KMT Level 9 Level 9 (15,435 points)

            Might want to ask yourself if you intend to include support for < iOS 13...


            If you do, you can't use SwiftUI alone, but you can still use Xcode 11 w/deployement set lower, so...see https://forums.developer.apple.com/message/364021#364021


            I expect a mix for some time...look how long XIBs hung around after Storyboards came out.

              • Re: Storyboards deprecated w/ SwiftUI or not?
                helloworldchris Level 1 Level 1 (0 points)

                I kind of wish Apple gave us some guidance on what the future holds so we can plan ahead.  Maybe the famous eskimo + 1 + @ + apple.com could let us know.


                We still use xib's, we use storyboards, we will probably use swiftUI (once it's stable, so not right away).  Hard to plan if they don't tell us explicitly what's staying and what's going.


                xib = reusable cells and custom views.

                storyboards = view controllers or some small groups of them (merge issues are too common, so we split controllers).


                Wishlist item is that they let us reference xib's inside storyboards for table cells and view controllers.  But I don't know if they intend to support those going forward.


                More swiftUI samples would be great.