目标:我想呈现一个新场景:
[self.scene.view presentScene:level2 transition:reveal];
Run Code Online (Sandbox Code Playgroud)
并结束当前的背景音乐以启动新的背景音乐(2级的新背景音乐).
问题:在呈现新场景时,1.场景(level1)的背景音乐一直在播放,即使在离开迷你游戏时也不会停止,因为整个游戏由几个迷你游戏组成.
播放的音乐是SKAction:
@implementation WBMAnimalMiniGameLvL1
-(id)initWithSize:(CGSize)size {
if (self = [super initWithSize:size])
{
/* Setup your scene here */
self.temporaryScore = 0;
self.animalSKSprites = [[WBMAnimalsMiniGameModel alloc] init];
self.backgroundImage = [SKSpriteNode spriteNodeWithImageNamed:@"farmBackground1024x768.png"];
self.backgroundImage.position = CGPointMake(CGRectGetMidX(self.frame),
CGRectGetMidY(self.frame));
self.temporaryStartingPointIndex = -1;
[self addChild:self.backgroundImage];
self.playBackgroundSound = [SKAction playSoundFileNamed:@"farm.mp3" waitForCompletion:NO];
//SKAction *repeat = [SKAction repeatActionForever:playSound];
[self runAction:self.playBackgroundSound withKey:@"play"];
[self drawAllAnimalsOntoScreen];
}
return self;
}
Run Code Online (Sandbox Code Playgroud)
这是向下一级别的过渡发生的:
-(void)transitionToNextLevel
{
NSLog(@"transitionToNextLevel");
SKTransition *reveal = [SKTransition moveInWithDirection:SKTransitionDirectionDown duration:0.5];
//SKView *skView = (SKView *)self.view;
SKScene *level2 …
Run Code Online (Sandbox Code Playgroud) 我在Mac OS X 10.9.5上安装了所有iOS 8模拟器的Xcode版本6.0.1(6A317).我还下载了iOS 7.1模拟器.
我正在为iOS 8和iOS 7开发应用程序.
我遇到的问题是Xcode 6没有在设备菜单中显示iOS 7.1模拟器.在某些时候,它确实显示了它们,但在我新创建的Xcode 6项目中却没有.
我正在寻找一些stackoverflow解决方案.我已经添加了iOS 7.1模拟器Window - Devices - SIMULATORS.它们也会通过"在运行Destionations菜单中显示"进行检查,但它们不会显示.
我通过将Project和Target Deployment Target设置为7.1找到了解决方法.但是,这是一个愚蠢的解决方案,因为对于每个测试我需要手动切换它们并返回7.1-8.0
这是我的第一个ipad应用程序,它在Xcode 5.1.1下运行良好.iOS 7和iOS 8(在Xcode 5.1.1下创建).现在我在Xcode 6.0.1中创建了一个项目.并且该项目没有正确显示模拟器,95%的应用程序无法正常工作.
我是iOS开发的新手,但我认为这是一个错误,但我不确定.请帮忙.
我知道我的问题类似于这个iOS8企业应用程序安装问题 但是没有一个答案帮助我和我没有人解释崩溃日志错误,我认为这是解决实际问题的关键,而不是尝试添加另一个可能的解决方案工作.
到目前为止我尝试了什么:
这是日志:
iPad-itunesstored[81] <Warning>: LaunchServices: installing placeholder for com.firmName.
iPad installd[34] <Notice>: 0x1ad5000 -[MIClientConnection _doBackgroundInstallationForPath:withOptions:completion:]: Install of "/var/mobile/Library/Caches/com.apple.itunesstored/AppPlaceholders/5715016884658519113.app" type Placeholder requested by itunesstored (pid 81)
Run Code Online (Sandbox Code Playgroud)
PID 81 =应用安装请求
PID 31 = pid81请求占位符安装,应该在后台通过pid 31完成
iPad installd[34] <Notice>: 0x1ad5000 -[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundle ID=com.firmName.AppyName; Version=1.0, ShortVersion=(null)>
Run Code Online (Sandbox Code Playgroud)
正在安装......
iPad MobileStorageMounter[187] <Error>: 0x3cce29dc Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such process
iPad MobileStorageMounter[187] <Error>: 0x3cce29dc Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: …
Run Code Online (Sandbox Code Playgroud) deployment ×1
ios7 ×1
ios8.1 ×1
over-the-air ×1
skaction ×1
skscene ×1
skview ×1
sprite-kit ×1
xcode ×1
xcode6.1 ×1