开发者

How to make welcome window?

I am creating an app in which i want to create one welcome window/view (I don't know exactly coz i am very new to c开发者_如何转开发ocoa development) something like this..

How to make welcome window?

So when my app launches this welcome window display at top of the mainWindow and when i click any Button from this welcome window/view then and then i can perform any action on mainWindow.

Can anyone help me in this..??

Thanks in advance..!!


  1. Learn how to make a window appear/disappear. Look up makeKeyAndOrderFront: and close: in the documentation.
  2. In your app delegate's applicationDidFinishLaunching:, show the welcome window.
  3. When the button is pressed, close the window.
  4. There's no step 4!

That said, let me say my personal opinion. I don't like welcome windows, because it distracts from me doing the thing I like to do with your app. Not many apps have them. Those who have them always has a checkbox on it which says "don't show welcome window on launch". So, please implement them.


If You want to disable clicks in Your main window you should enable mouse ignoring:

[mainWindow setIgnoresMouseEvents:YES]; 

and when user clicks welcomewindow's OK button disable ignore mouse events:

[mainWindow setIgnoresMouseEvents:NO]; 

**where mainWindow is Your IBoutlet main window!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜