Cocoa launch application window

时间:2015-07-28 23:16:19

标签: objective-c macos cocoa nswindowcontroller

I need to implement in Cocoa a initial windows with information and logo of the company such like this:

enter image description here

My question for you guys is how can avoid showing the window bar:

enter image description here

I'll really appreciate your help.

2 个答案:

答案 0 :(得分:3)

What you're referring to is known as a splash screen. Here's a beginner-friendly tutorial on creating one in objective-c.

答案 1 :(得分:2)

Turn off "Title Bar" of the window in Interface Builder (in the window's attribute inspector).

If you are creating this programmatically, the property you are looking for is "styleMask". These are the available masks:

enum {
   NSBorderlessWindowMask = 0,
   NSTitledWindowMask = 1 << 0,
   NSClosableWindowMask = 1 << 1,
   NSMiniaturizableWindowMask = 1 << 2,
   NSResizableWindowMask = 1 << 3,
   NSTexturedBackgroundWindowMask = 1 << 8
};