Making the Name of the App appear in the Menubar (top-left corner) when the App is LSUIElement - objective-c

How would I make the name of the app appear here ( like with a normal app )…
alt text http://snapplr.com/snap/6sgc
… when the app is an LSUIElement.
My Problem is that when the App is LSUIElement the name is not by default displayed in the menu bar like an normal app. Basically all I want LSUIElement to do is to hide the dock icon not the name in the menu bar.
For those who's native language isn't English, when I say 'App' i mean 'Application'.
Thanks.

Don't do this; it's not what users expect. A dock icon and menu bar go together. If you want to get both a dock icon and menu bar icon in your UIElement app, use TransformProcessType.
If you really must, you can draw your own menu bar window (if you use the appropriate window level it'll appear over the top of the existing menu bar).

Related

Is there a special name for a toolbar like thing at the bottom of Instagram?

The attached Instagram snapshot has a collection of buttons like Home, Search, Add etc. at the very bottom. What is this component called? Is it called tab navigator? Any special name for it?
iOS calls this a Tab Bar, which appears at the bottom of an app screen and is used for navigation between an app's various functions.
It's not the same as a Toolbar, which appears at the bottom of an app screen and contains actions relevant to the current view.

how to create a another dock

I want to create a dock which will contain some application's icon and at runtime user can add application to that dock by dragging them to dock. when user click on any app icon present in that dock, that app should lunch
hare I don't want to replace the system dock or i am not trying to create a dock inside a application . this is just a another dock in system .
so can any one tell me how to setup this dock app.
Just create a NSWindow, and set the correct level with -[NSWindow setLevel:NSDockWindowLevel];
You can also set a window not to have top bar with buttons and to have transparent contentView.
Then you should handle drag and drop of applications.

Re-create Cocoa application menubar

I'm making a statusbar application and load a new xib containing the main window for the application when clicking on a statusbar menu item. However, in the process I deleted the application menu bar. I don't see a way to hook up the NSMenu object I created in the interface builder.
The window loads just fine, and the status bar icon is still present, but when I make the main window the key window, the application menu bar doesn't change, it just shows the previous app that was active.
I have followed the instructions/suggestions here and here, but neither of them work. Is there some other step I've missed?
Thanks!
The behavior you're describing is normal for background applications. If you don't have an icon in the Dock, you don't get your own menubar, even if you have a window in the foreground.

Cocoa: hide NavigationBar

I'm using UIXOverlayController to show custom popup in my application.
Popup has some buttons, one of them is "Send SMS" which uses MFMessageComposeViewController.
When i click "Send SMS" button, sms composer appears, but without it's TOP bar (where "Cancel" button is located).
Suppose, that my application's Navigation Bar overlaps SMS composer Bar and i need to bring sms top bar to front.
I also tried to hide navigation bar when popup window is active, but there is no method "self.navigationBar" in overlayController ".m" file. And i think that all work with hide/show navbar should been done in overlaycontroller.
Any suggestions? Thanks!
Have you tried adding self.navigationBar.hidden = YES;? That should hide the navigation bar.

Show NSWindow as dropdown from NSStatusItem?

How can I show an NSWindow when clicking on an NSStatusItem, such that it shows over other applications when appearing, but without causing them to lose active status?
I have seen MAAttachedWindow, and it is neat but it does not show on top of other applications unless its own application is active.
I would check out this excellent tutorial and sample project:
Cocoa Popup window in the Status bar
That example shows how to "attach" a window to a status bar item, but you could position the window wherever you want. Basically, if you define your app as a LSUIElement you can display floating utility windows despite your app never activating or showing a dock icon, and other apps still remain key.
if you use MAAttachedWindow, you can set the winow level as NSStatusWindowLevel. Then it will show on top of other application.