Xcode font picker window unable to select font collection - xcode

Font selection window that prompt out from the built in interface builder is unable to select font collection. It is stuck at a particular collection. When resizing the Font selection window, the collection column will show and immediately disappear once release the resizing.
I do not have an extra Mac, so I wish someone could help me verify this bug using latest release OS X and Xcode from App Store.
Steps to Reproduce:
Create a new SpriteKit game from the built-in template.
Open the GameScene.sks file.
Drop a SKLabelNode into the scene from the Object Library
Select the SKLabelNode and change its font using the Attribute Inspector by clicking the "T" icon on the Font field.
The Font selection window should prompt and resizing this window will make the column appear.
Expected Results:
The "Font Collection" window should always appear, and able to select any font from any collection.
Actual Results:
The "Font Collection" window always disappear.
Version:
Xcode Version 7.2.1 (7C1002) & OS X 10.11.3 (15D21)
Notes:
http://www.openradar.me/23181461
https://forums.developer.apple.com/thread/30366
Update 1
I try to install a fresh copy of Xcode (7.2.1) with another fresh OS X Yosemite 10.10.5/14F27 (with no xcode installed previously), the font collection column is there.

This affects all NSFontPanel instances across Xcode. (For example, it can also happen when selecting source editor fonts in Preferences, in Interface Builder inspectors, etc.) The master bug is radar://22656458.
Note that someone on the forum suggests a possible workaround:
https://forums.developer.apple.com/thread/30366#121058
I haven't tried this, and can't say whether it's a good idea, so YMMV.

defaults write -app Xcode NSFontPanelAttributes -string "1,0"
try this command in terminal, then restart Xcode

Related

Xcode 11.2 assistant layout greyed out

I can't change the layout of the assistant editor in Xcode 11.2.
So the matching code of the storyboard is always on the right which drives me crazy bc I'm working with 21" screen.
The phenomen appears when updating Xcode from 11.1 to 11.2.
The Layout can be seen, but its greyed out. I cannot choose the available options Editor on left , Editor on top.
I've tried to change editor orientation, but have no success.
Opening a second editor below shows the assistant editor of the new editor pane on the right too?!
Updated for Xcode 13.x.x
You might've accidentally enabled Focus Mode which I just realized was the reason I couldn't open additional Editors:
Turn Focus Mode off and you should be able to add Editors as expected.
View > Editor > Toggle Focus (Hide Focus)
Shortcut: control + shift + command + return
Switched back to Xcode 10.2.1 with symlinking 13.x devices by Xcode 11.2 installation.

How to change the Mac OS X dock icon in a wxPython application

When a wx.App is launched through a script (i.e., not bundled with py2app) its icon in the dock is the standard Python rocket. Is it possible to customize that icon? It seems that in the past wx.TaskBarIcon did this (see http://wiki.wxpython.org/Custom%20Mac%20OsX%20Dock%20Bar%20Icon), but now it adds an icon to the menu bar.
I had the same issue and it seems there is a lack of documentation about this. I found several piece of information in different discussion threads.
You have to use the iconType argument of the wx.TaskBarIcon constructor. there are currently three possible values:
wx.TBI_CUSTOM_STATUSITEM: will create an icon in right part of the menu bar.
wx.TBI_DEFAULT_TYPE: default parameter, similar as TBI_DOCK for wxPython 3.0.
wx.TBI_DOCK: will replace the Python rocket with the selected icon
If you reuse the example from the wx official documentation, you just need to replace this line
wx.TaskBarIcon.__init__(self)
with this line
wx.TaskBarIcon.__init__(self, iconType=wx.TBI_DOCK)
The problem with this solution is that you have to choose to put the icon either in the menu bar either in the dock. It does not seem possible to put an icon in the both place while using only one instance of wx.TaskBarIcon.
Here are my current settings:
mac os X 10.11.5
wxPython 3.0.2.0
python 2.7.10

How to add Toolbar Button to Title Bar

I have created a toolbar via IB and have a simple View menu with the "Show Toolbar" and "Customize Toolbar" menu items. Both work exactly as I would like them to.
But, I cannot seem to get the Toolbar Button to show up in the title bar of the NSWindow.
I have tried setting the "Shows Toolbar Button" in IB... no luck.
I have tried calling setShowsToolbarButton in the window controller's awakeFromNib
NSLog(#"showsToolbarButton: %#\n",[[self window]showsToolbarButton]?#"YES":#"NO");
[[self window]setShowsToolbarButton:YES];
NSLog(#"showsToolbarButton: %#\n",[[self window]showsToolbarButton]?#"YES":#"NO");
Again, no luck. Both log entries show "NO" and there is no button.
Has this feature gone away?
If not, what is the proper way to get that button to show up?
I'm building for OSX 10.6 and newer using Xcode 5.0.2 on a machine running 10.9.
Thanks for any/all insights.
The button to hide and show the toolbar was commonly seen as a small capsule button in the upper right corner at least through 10.6 Snow Leopard.
It is no longer present in standard OS X windows.
Ostensibly this is still in Xcode for supporting projects targeting older versions of OS X.
You can probably still create your own button and set its action to the same selectors, but you would likely need to create a custom window using NSBorderlessWindowMask to get the button in the title bar where it used to be.
In its place for the last several OS X versions you will find the full screen button instead.

How insert full-screen button and bottom bar in interface builder mac os x and bottom bar

i can't understand how i can insert the corner top right full screen button in interface builder like this image:
and then also a bottom bar like this:
if i create a new application in Xcode the Window is this:
and there is no corner full screen button and no bottom bar...any help?
In Xcode 4.5.2 there is an option in interface builder to set this feature on (just select your window in IB, the option is named "fullscreen" in the window's attributes inspector, and is set to "unsupported" by default, just switch it on "primary window")
For the "bottom bar" ... i think it's just a NSView that is smaller than the NSWindow ^^
You should use Full Screen APIs in your NSApplication.
Go to the below link to learn how to implement this. Also be aware that this option is applicable on Mac OS 10.7.x and Mac OS 10.8.x only.
[Mac OS X 10.6.x and Xcode compatible with 10.6.x will not support this feature]
https://developer.apple.com/library/mac/#documentation/General/Conceptual/MOSXAppProgrammingGuide/FullScreenApp/FullScreenApp.html
Make sure that you have latest version of the OS and Xcode as well.
NSWindow -> size inspector -> content border

How to set an OSX application dock icon in XCode?

So far the only working solution I have found is to use:
[NSApp setApplicationIconImage: myImage];
But this message is sent after the default icon is already in the dock, so it's not working: the icon is initially set to the default application icon. I have not found the correct place to send this message.
I have read this: How can I set the icon for a Mac Application in Xcode? but it seems a bit too old to be useful for XCode 4.3
What is the standard way to set the dock icon, and even more importantly, where in the documentation is this described ?
I have trashed 4.3 two days ago, so I am using 4.5 developer preview to explain, but it should be similar.
Open up you project
In the left inspector be sure you are in the project navigator
Click the top node which should be named like your project
The middel section should now show some summaries of your project
Click on your Project name under "Targets"
The middle section should now show some Tabs, get on "Summary"
Drag your Icon file to the App Icon field.
Hope that helps.

Resources