Xcode 10 how to add new element in separate window - xcode

I'm using XCode 10.1 and it seems they yet again changed things nobody asked for, and now I can only add new elements to a storyboard via a circular menu on top.
Fine, however when I open the storyboard in a new window, this menu is not showing, and they removed the old way to add new UI elements. So any way to use the new menu in a separate window?
Thanks

If you hold down the Option key when clicking the Library button in the project window toolbar, the object library will stay open in a separate window, and you can access the user interface elements from your storyboard opened in a new window.
See matt's answer to the following question for more details:
Where did the Object Library go in Xcode 10?

Related

How to enable auto generation of Window MenuItems (e.g. Tile Window to Left/Right of Screen and Open file with checkmark) in macOS menubar

I am currently creating a macOS menubar for an app without using any interface builder (no XIB/NIB files), just pure code. However I was expecting some items to be auto-generated during the start-up of the app. Items like "Start Dictation", "Emoji & Symbols" under Edit menu were existing as well as the "Enter Full Screen" menu item under the View Menu. But when it comes to Window Menu nothing was automatically generated, only the menu items I've set in the code. Do I have to enable some flags or options when instantiating a Window NSMenu so it automatically generates those items? I am new to macOS development so I feel like I am kind of lost. Thanks in advance.
The Window and Help menus are a little special in that they have their own NSApplication properties, so you will need to set them to your menus so that the system will know what they are.
For example, if you just create a window menu and add it to the main, all you will get are the items that you have provided. If you also set it as the application’s windowsMenu, in addition you will get all the stuff for moving, tab support, etc.
Setting NSApp’s helpMenu is similar, where a Spotlight menu item is added to the menu.

How to ctrl drag object from view into code when code is opened in separate window?

I'm trying to use Xcode for the first time and have run into an issue. I've read to add event handlers for objects, you ctrl+drag them from the view into the code.
The problem is that in Xcode 7, the code is shown in a different window than the view. When I try ctrl+dragging the object, there is no way as far as I can tell to get it into the code window. I tried pressing ctrl+` to open the code window, but it doesn't work while ctrl+dragging.
Video: http://www.screencast.com/t/0z2IuuTXaB
Keep the Interface Builder view open and open also the Assistant Editor (click on two circle symbol on right top or press ⌥⌘↩ ).
PS: I recommend to watch the WWDC videos "What's new in Xcode" of the last 2 or 3 years

Xcode 6 open Assistant Editor in New Window

I feel like I have read every link on Google pertaining to this question, but none that I have read have helped.
All I want to do is view my Storyboard layout on the left monitor, and on my right monitor, in a new window, have the Assistant Editor open to "Preview" for my Storyboard so that I can preview the different devices sizes (clicking different storyboard views on the left screen should update the assistant editor preview on the right). This seems so simple, but has not proved to be.
Please tell me this is possible.
EDIT: This guy seems to have it working but following the steps didn't work for me.
It's possible.. and it's awesome:
I do have this working after following the instructions linked in the OP. I think the author left out that you need to click on the view controller that you're editing in BOTH instances of the story board window to see the changes update. Then as you're editing on your main window the changes will update to the open storyboard and thus the preview will update as well. I was able to test this and achieved a somewhat desired result.
In case the link goes dead here are the instructions lined out
Here’s how you can set this up…
In the Project Navigator pane, single-click a storyboard/XIB file to open it in the main Xcode window.
Now double-click that same file to open it in a new window.
Move the new window to another monitor and maximize it
(So now you have the story board on 2 windows)
Click on the new window to make sure it has input focus, then type Option+Command+Enter to open an assistant editor in that window.
In the assistant editor’s jump bar click on ‘Automatic‘ to open the drop-down menu (see the screenshot below if you don’t know what this means).
Click on the ‘Preview‘ menu item to open the preview editor.
Click and hold next to the assistant editor’s jump bar, then drag up or left (depending on which editor layout you prefer; vertical or horizontal), to maximize the preview’s screen real estate.
Lastly... the part the author left out is that you need to select the view controller you want to edit in BOTH story board windows and then just drag the preview window to cover more of the screen.
It's not pretty but it's effective.
Edit: wording and grammar :)
This is not currently possible (Xcode 6.3.1 at the time of writing). The best you can do is open your storyboard in one window, open it again in a new window, open the preview, and slide the assistant editor as far left as possible. The preview won't take up the entire window, but it'll be pretty close.

Where is the inspector window in Xcode 4.0.2

Before I used to open the inspector window ( Segmented Control Attributes) like:
Now that I upgrated to Xcode 4.0.2 I have this:
How could I open the Inspector window in Xcode 4.0.2?
I think the problem might be that you've hidden the Utilities view. To re-enable this, simply click on the rightmost of the "View" icons in the main window, as shown below.
Incidentally, if you just single click on the .xib file, it'll open in the main view rather than a new window, which is probably more useful in this instance.

Interface Builder in Xcode 4

I just can't find the "Create iPad version" button in Xcode 4 because I want to turn an iPhone XIB in an iPad XIB, does anybody know where I can find this button in Xcode4?
This is somewhat hidden. You'll need to create a duplicate target. Select the project in the navigator, then right-click the target and select Duplicate. Choose to Duplicate and Transition to iPad. A group called "Resources-iPad" will be added to your project and will contain the iPad-converted xibs.
You can also do a search-and-replace on a copy of your iPhone .xib file in a text editor, replacing the term "IBCocoaTouchFramework" with "IBIPadFramework".
In addition to Joshua's step you need to set the target to iPhone or it doesn't give you the option to "Choose to Duplicate and Transition to iPad". If the target is set to universal it does not work.
A slightly longer way, to build one from scratch. When all else fails, try the following:
You have to create, through Xcode4, a new MainWindow file for the iPad version.
In Xcode 4, File > New File.
Choose IOS > User Interface > Application, then Next.
Choose Device Family (assume iPad).
Call it MainWindow-iPad.
This creates a new MainWindow-iPad.xib file.
Now, you have to link it to the app delegate.
Click on the new MainWindow-iPad.xib file under your file tab.
Click on App Delegate.
In the inspector window, choose the 3rd pushpin. This is the identity inspector.
Choose the class of your appDelegate.
Now, link it to the window for the screen, plus add any navigation controllers, etc., for this screen.
Go back to the app delegate row under objects, and control-click from the app delegate to the Window, to make that an outlet.
Drag Tab bar controller from the library, and add it below the window.
Control-click on the app delegate, dragging to the tab bar controller. Make that an outlet.
This gives you a complete MainWindow-iPad file.
Now, select the Target, change deployment to Universal, and change the Main Interface under iPad Deployment Info to MainWindow-iPad.
That should do it!

Resources