New tab button - UIWindowScene and macOS Catalyst - swift

Is it possible to add a "New Tab" button to the tabBar, like Safari and Finder has? My app is a Mac Catalyst app and has support for multiple windows, but to open new windows the user has to select it from the menu bar or use keyboard shortcuts.
The idea is to have this built-in Tab Bar work much like https://github.com/stuffmc/TabbedViews does.
.
The built-in one has:
No + button (and no New Tab menu either)
Only the option to display the full display of a window. This one can display the Tab Bar anywhere, and especially also on iOS.
This one though has no support yet for Move Tab to New Window and of course one need not to forget to remove Merge All Windows, otherwise both will conflict.

Related

Cocoa Swift: Connect Main Menu to Preferences Window Controller & Disabling Items like Minimise in Attributes Inspector doesn't work in Xcode?

I have a simple Menubar app in which it has 2 options - namely Preferences & Quit
After clicking on Preferences it opens a new window but doesn't show the menu bar
I tried connecting from Main Menu to the Window Controller but it doesn't work.
I drag it from the Application Name to the Window Controller or View Controller using Ctrl+Drag but still it doesn't work.
Another issue is my Preferences Window is resizing even though I unchecked the resize button in the Attributes Inspector.
Even Maximise & Minimise checkboxes are disabled but they are still showing.
Any solutions?
See NSApplication.activationPolicy.
If you want the app's main menu bar to appear, you'll need to change the activationPolicy to NSApplicationActivationPolicyRegular. Once you do that, the app's main menu will appear when your app is the active one. (It will also appear in the dock.)
If you want this to happen only when your preferences window is open, then you'll need to change the activationPolicy when the window opens, then set it back again when it closes.
You don't need to connect any outlets for this; the Main Menu should already be a resource for your app and should be loaded automatically when your app launches.
I think I had given Storyboard Id to my View Controller rather than my Window Controller so it wasn't working.
I also checked some apps like Dropbox which didn't have Main Menu Bar because it was a background or accessory app so I ditched it.
Some apps like Focus have it though. But I went with the popular choice.
As for no resizing, no minimising & no maximising goes, I pasted below code & it worked
var myWindow: NSWindow? = nil
myWindow?.styleMask.remove(NSWindow.StyleMask.resizable)
myWindow?.standardWindowButton(.miniaturizeButton)?.isEnabled=false
myWindow?.standardWindowButton(.zoomButton)?.isEnabled=false

OSX add application menu (file/edit/view...) to app manually

I'm building a OSX app and I noticed it has no "application menu" (the top left file/edit/view menu), I can't seem to find much about this other than it should be added automatically. How can I add it manually and add or remove items?
I can click it but no menu opens.

Hide Eclipse Menu Bar (auto-hide)

I'm trying to hide Eclipse menu bar to save some screen real estate. I found I can do this using perspectives but that would permanently take out the menu from that perspective. The behavior that I want to get is something along of auto-hide, so that the menu remains hidden until I hit ALT+F for example or any other ALT key combo.
Is there's a setting or a plugin that can do this?
Thanks!
This is just a work around. Create two perspectives.
First one named - With Menu.
Second one named - Without Menu.
In the "Without Menu" perspective remove all menu items and Save.
To create the effect of hiding and showing, switch between perspectives by using
Ctrl+F8.
Theres a fast view option- just right click the tab and select Fast View. It'll bring the entire window down to the eclipse taskbar. You can recover the window by just clicking on it's icon.
Source: https://bugs.eclipse.org/bugs/show_bug.cgi?id=56119
Have a look here Is there a Macro Recorder for Eclipse? You could set up the macro so respond to ALT+F possibly.

Drop-down menus in Emacs.app 23 (Lion) only work after several clicks

I am using Emacs.app 23.3.1 on MacOS 10.7.1 (Lion). When I try to use the GUI drop-down menus, they will not appear unless I click on the menu several times. The top-level menu item (e.g., File, Edit, Options) will highlight to acknowledge the click, but the menu will not appear. I have seen this question, but no fix ever appeared. I am not using Synergy. It is obviously not the end of the world, but it is an annoyance. I would prefer not to use the text-only menubar system. This behavior does not appear in Aquamacs.

How can I enable vertical split views in the Xcode IDE?

I'm diving into iOS development and I'm using Xcode on a multi-monitor setup.
Obviously I want to take advantage of the multiple monitors to view and edit multiple panes of source code, but I'm having a hard time figuring out how to enable vertical split views. In other IDEs, it's just an option you click in the "Window" menu.
How do I enable vertical split views in Xcode?
Xcode 4
Check out the options in the Navigate file menu item. I like Command+J. Also, while the Editor is active, i.e., you're editing code or your cursor is blinking in the Editor, press Command+Option+,. Or, you can Option-click (or Option+Shift-click) a file in the Navigator. Then, to make more room for editing, I like to press Command+0 to hide the Navigator and, if they're not already hidden, Command+Option+0 to hide the Utilities. Press Command+Enter to go back to the Standard Editor view.
Xcode 3
Hold down alt and click the little tiny box (with a horizontal line through it) in the upper-right-hand corner of the screen. It's underneath the tiny little lock icon.
Xcode 9 for those coming from a search engine:
Click and hold on the Assistant Editor button for an options menu. Choosing "Assistant Editors on Right" will cause the view to be split vertically.
This has changed in Xcode 12, maybe earlier. All my Option-Clicks go to open second view appearing below rather than size by side. The solution is to go to Views -> Change Editor Orientation
respect to mattdipasquale
Command+J --------Check out the options in the Navigate file menu item
Command+Option+,------editing code or your cursor is blinking in the Editor
Option-click (or Option+Shift-click)------open a file in the Navigator
Command+Enter----------reset
Use the dropdown on the split icon to choose between different views
For Xcode 14 you just have to click this icon: