English 中文(简体)
我将如何歌唱或对我的可可 app进行闪 screen?
原标题:How would I play songs or make a splash screen for my cocoa app?
  • 时间:2009-09-01 22:49:50
  •  标签:

我将如何歌唱或对我的可可 app进行闪 screen? 我知道这是一个简单的问题,但在谈到可可时,我完全不明白。

问题回答

您希望创建申请代表班,并采用<代码>-application WillFinishLaunching和-applicationDidFinishLaunching方法,以显示/hide世袭或开始/结束你的录音。 你可以在项目<条码>MainMenu.xib上将这一类申请作为Interface Buildinger中的申请代表联系起来。

铭记它通常被认为很不好,不得不在Mac apps上显示间谍/载荷屏幕。 如果你能够立即投入资源,或把资源装到底线上,那么,这为你的用户提供了更nic的经历。

Barry是正确的,你必须摆脱这种想法,使用闪电屏幕,主要是“M$Windows”概念,用户要等到电灯上装,我只想显示一刀,这样你才能感到重要,但我告诉你:从一开始就用“只上市的”闪电屏幕表示 t,因为用户只等待装货,而且他/她将立即每看一看一开始。

Now, about the songs.. I ll help you on this one, but I m telling you again: it s useless, can t see the usefullness in having a sound play on every startup... so putting sound and a splash screen to your app startup will scare most users away, and your app won t made it!


So, to load a song you use the NSSound class like this:

NSSound *s = [[NSSound alloc] initWithContentsOfFile:songPath byReference:YES];

之后,你可以采取以下方法控制:

[s play]
[s pause]
[s resume]
[s stop]




相关问题
热门标签