Second TouchBar - swift4.2

I have two sroryboards in my macOS app (with two separated WindowControllers). I'm wondering how I could in XCode IDE create two TouchBars each connected to own Window Controller Scene in storyboard. Actually I can create two TouchBars but just the one from Main storyboard is shown when I run the app.
What's proper way to customize TouchBar for the second storyboard window?
Thanks.

Related

Where did tabbed controller views go in storyboard?

Forgive but I haven't coded in about a year or two, so I haven't been following the latest update in Xcode.
Anyways, I decided to go back and brush up on some skills and I noticed right off the bat that a lot has changed.
I created a new project using the tabbed view controller set up, usually it shows in storyboard immediately upon creating the project. Now there is nothing there. Where did it go and how do I bring it back?
I attached a screenshot so you can see the simulator running the tabbed apps but not showing in storyboard.
enter image description here
You opened the LaunchScreen.storyboard. This layout appears on the screen for a few moments while the app is launching.
https://developer.apple.com/documentation/uikit/app_and_environment/responding_to_the_launch_of_your_app
https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/launch-screen
The storyboard that you are looking for is Main.storyboard
Notice, that there is no Main.storyboard if you start with SwiftUI
There are no specialized app templates any more. But there is still a tab view controller object in the storyboard editor's library, so just drag it into the canvas and use it. It gives you same two-child tab view controller as before.

How to convert manual view controller to storyboard as a launch screen

New iOS requirements need Apps for iPhone or iPad must be built with the iOS 13 SDK or later and use an Xcode storyboard to provide the app’s launch screen.
But my project is very old and has never used Storyboards. All UI elements are created dynamically using ViewControllers.
I managed to create a storyboard file and set it as a launcher but it has no scenes and I do not know how to proceed. I would like to:
Create a scene where I place only the original launch image inside (hoping that apple still accepts this branding)
If it is possible to just connect my main ViewController with the scene (if that works with dynamical ViewControllers)
If nothing helps than I would need to create a simple scene which has just a bottom bar like my ViewController
I had this exact issue, here's what I did:
Create LaunchScreen.storyboard and set to use it as launch screen
Using the + button in the top-right (this was not an obvious step), add a View Controller into the storyboard
Untick "Use Safe Area Layout Guides" on the right panel if you're getting that error
Tick "Is Initial View Controller"
Then clean and run, for me it just worked. I did have trouble seeing it update though, as discussed here: Launch Screen storyboard not displaying image

OSX Multiple toolbars in NSTabViewController

I have a structure which is represented in the picture below (sorry but apparently in OS Sierra Xcode does not support anymore zooming in the storyboard -.- )
Window > TabController > View Controllers
Basically what I wanted to do is to have multiple toolbars, each one for a different ViewControllers. If I were on iOS I could have set a UINavigationController as target of the TabViewController and then do whatever I wanted with the related navigation bar, but here in OSX I cannot link the TabViewController to a WindowController (which handles the toolbar), hence having a window controller per view controller.
Is there any simple workaround for that?
Or the only solution is to empty-refill the toolbar with the correct buttons every time a Tab is selected?

Is there a way to open and view the storyboard in two different windows on Xcode 7?

I'm using Xcode 7.3.1 I would like to have the same storyboard open in two side-by-side windows. I tried using the Assistant Editor to manually open the same storyboard and that works fine but when I click on one side or the other the storyboard in the other window disappears.
The reason I'm trying to do this is I want to replicate parts of the storyboard to another part and it's annoying to keep navigating all over the place and trying to remember what it looked like.
No. Storyboard is a XML file, that save changes not as often as to work with it from two screens. It can lead to mistakes. However you can temporary copy UIViewControllers and place them wherever you need, replicate parts and delete them.

How to have my ViewController use a different storyboard? xCode 6.3

I duplicated a storyboard, and changed colors is all. What do I need to do to link my ViewController to use this other storyboard? thank you.
Select your project folder in the navigation window. Under the Deployment Info section, click on the "Main Interface" text field and select your alternate storyboard. This will set it as the initial interface at launch time. If you want to switch between the storyboards while the application is running, that's a little more complicated and not something I've had to figure out yet.

Resources