我正在尝试测试我正在处理的应用程序,但应用程序显示黑屏,我在左侧面板上的线程1旁边得到一个黄色警告三角形的东西(我忘了它的名字)它说线程1 ,并在Queue下:com.apple.main-thread。此外,每次线程暂停时都会显示主方法和
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([DXAppDelegate class]));
}
我猜我的图像视图或其他东西出了问题...我不知道在哪里可以找到错误日志。 感谢您的帮助 还有,继承人我的班级
//
// DXViewController.m
// SpaceShipGame1
//
// Created by Abdul Ahmad on 2/15/14.
// Copyright (c) 2014 Abdul Ahmad. All rights reserved.
//
#import "DXViewController.h"
@interface DXViewController ()
@end
@implementation DXViewController
-(void)giveBulletsProperties {
// bullets.image = @"bullet2.png";
//bullets.center = CGPointMake(userSpaceShip.center.x + 35, userSpaceShip.center.y);
}
-(UIImageView *)shootBullet {
return bullets;
}
-(void)gameMovement {
}
-(IBAction)clickUp:(id)sender {
}
-(IBAction)clickDown:(id)sender {
}
-(IBAction)clickStart:(id)sender {
isAtStartScreen = NO;
[self hideStartScreenViews];
}
-(void)showStartScreenViews {
enemyShip1.hidden = YES;
enemyShip2.hidden = YES;
enemyShip3.hidden = YES;
enemyShip4.hidden = YES;
enemyShip5.hidden = YES;
userBullet.hidden = YES;
enemyBullet1.hidden = YES;
enemyBullet2.hidden = YES;
enemyBullet3.hidden = YES;
up.hidden = YES;
down.hidden = YES;
startButton.hidden = NO;
title.hidden = NO;
score.hidden = NO;
}
-(void)hideStartScreenViews {
enemyShip1.hidden = NO;
enemyShip2.hidden = NO;
enemyShip3.hidden = NO;
enemyShip4.hidden = NO;
enemyShip5.hidden = NO;
userBullet.hidden = NO;
enemyBullet1.hidden = NO;
enemyBullet2.hidden = NO;
enemyBullet3.hidden = NO;
up.hidden = NO;
down.hidden = NO;
title.hidden = YES;
score.hidden = YES;
startButton.hidden = YES;
}
-(void) gameLogic {
}
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
//UITouch *touch = [touches anyObject];
}
- (void)viewDidLoad
{
[self showStartScreenViews];
userSpaceShip.hidden = NO;
backgroundImage.hidden = NO;
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
答案 0 :(得分:1)
您可能错误地将uiviews绑定到.h文件,当您尝试手动执行时,尝试使用ctr键并单击并拖动