I can hide the status bar in my application easily enough, but I can't seem to get rid of it in the storyboard. It doesn't really affect anything - it's just a little annoying. The simulated metrics setting I used to use is gone. Is there a new way to hide the status bar in storyboards?
Related
NSPanel has a “Non activating” option for HUD Panels. I’d like to get that same functionality working on an NSWindow, i.e. I want the window to accept clicks but not take focus away from whatever the active app is (by this I mean the app that was active before clicking on the window activated my app—in this case Sketch).
I have tried creating an NSWindow subclass and setting canBecomeMainWindow and canBecomeKeyWindow to NO but that doesn’t seem to be working—I think because those settings only apply to windows within the same app.
What I’m trying to do here is prevent this flickering. I’m pretty sure this is doable as apps like Alfred seem to be doing it.
How can my menubar application achieve the same behaviours as 1Password or Dropbox:
clicking their menu bar icons or popovers does not steal focus, e.g. while I am in for example TextEdit and open 1Password/Dropbox, the blinking cursor disappears but the window itself does not go into the background, yet I can type into 1Password's text field.
even though they didn't take focus in the first place, they disappear when I click back into another application
I figured out how mouse over works in the Dropbox popover table view by using an NSTrackingArea with the options MouseEnteredAndExited, AssumeInside, and ActiveAlways.
I am trying to get the same behaviour to work in an NSPopover that opens from an NSStatusItem.
I found a workaround for now. I am able to get the same behaviour by using non-activating NSPanel with a window level kCGPopUpMenuWindowLevelKey and I had to override canBecomeKeyWindow to return true.
Unfortunately I haven't found a way yet to get a NSPopover to behave this way since it's not a subclass of NSWindow.
To set the kind of behavior you are describing you use:
yourPopover.behavior = .transient
I have a big problem with my slider cause the status bar
Here is the result
http://img11.hostingpics.net/pics/859893Capturedcran20131006122142.png
How can I fix this problem ?
iOS 7 apparently supports the Status Bar being hidden for some views but not others. To hide it for all views, do the following:
1) Make sure Hide during application launch is still checked, to support previous OS versions. 2) In your Info.plist file, add View controller-based status bar appearance and set it to NO.
3) You may need to "Clean" before building, (I did), but then your app should work as before: no status bar hanging over your views!
read this tutorial
http://www.doubleencore.com/2013/09/developers-guide-to-the-ios-7-status-bar/
I'm trying to get my NSWindow to:
Be visible on all Spaces
Be visible when showing the Desktop (by pressing F11)
Not be visible in Mission Control/Expose
The following does exactly that, but with a side effect:
[self setCollectionBehavior: NSWindowCollectionBehaviorCanJoinAllSpaces
| NSWindowCollectionBehaviorStationary ];
When switching to the Dashboard on Mac OS X Lion, the window remains visible alone with Dashboard items for a second, then it is hidden.
Is this expected behavior or a bug? Users of my app find it confusing to see the window on the Dashboard before they disappear. I would have expected them to only show on Spaces and not the Dashboard.
I looked at http://cocoadev.com/wiki/DontExposeMe searching for workaround
nothing really worked except.
self.window.level = kCGDesktopWindowLevel;
now maybe DETECT changes to expose and set that then :) ...
see How can one detect Mission Control or Command-Tab switcher superseding one's program in OS X? for that :)
maybe an answer will come up there
I was able to reproduce this behaviour and I think it's just a bit of faulty animation on Apple's side.
Just so I can explain this better, create a new project, add these two lines to applicationDidFinishLaunching:, and run it.
[self.window setCollectionBehavior: NSWindowCollectionBehaviorCanJoinAllSpaces | NSWindowCollectionBehaviorStationary ];
[self.window setHidesOnDeactivate: YES];
(self.window is the window that is created automatically when creating a new project. it doesn't really matter here anyway, just as long as it is a window that appears on the screen)
Now notice this behaviour: when changing from one space where you can see your window to another in which there are other windows from other apps (and so your window is supposed to disappear since your app will be deactivated), your window only disappears when the animation finishes. So, what is happening?
Here's what I think it happens: when switching from one space to another, windows that show on all spaces only react to the change after the animation, hence the brief appearence of your window on the dashboard. I think you'll notice it disappears exactly when the slide animation ends.
So, unfortunately, I don't know how to fix your problem. It just seems to happen this way.
An application has an NSPopover with some user inputs in the status bar and some windows. The windows work fine but when I open the popover in the status bar it opens inactive. I can see everything but it's all greyed out, like it's a background window. I've been trying everything I can find on activate, activateignoringotherapps, makekeyandorderfront, etc but none of these is having an effect. How can I shift the focus to the statusbar popover?
I also made a button in the window that showed the same popup to make sure it is working, when called from the window button it works perfectly from there. Then I click on the status bar, and it opens from there instead, but inactive.
Thanks for the help.
I've run into the same problem and haven't found a solution. Unfortunately, I believe this is a bug: http://www.openradar.me/radar?id=1226415
There's a framework called SFBPopovers which provides similar functionality and works fine with the menu bar.
It might help with your issue.