wait_fences:未能收到回复:10004003 - viewDidLoad
Posted
技术标签:
【中文标题】wait_fences:未能收到回复:10004003 - viewDidLoad【英文标题】:wait_fences: failed to receive reply: 10004003 - viewDidLoad 【发布时间】:2012-08-12 17:41:18 【问题描述】:我收到了这个错误,很好奇是什么触发了它。根据我的阅读,它通常是关于在 viewDidLoad 内设置动画或阻止 UIAlertView。
1.如果我注释掉scrollView代码块,错误就会消失。
2.如果我离开scrollView代码并从360Controller开始注释掉到页面One end。警告消失。
3.是不是因为内存过载?
- (void)viewDidLoad
[super viewDidLoad];
self.view.hidden = YES;
// Do any additional setup after loading the view.
self.view.backgroundColor = [UIColor grayColor];
//SCROLLVIEW Start
scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 1024, 768)];
[scrollView setContentSize:CGSizeMake(1024*6, 768)];
scrollView.bounces = NO;
scrollView.pagingEnabled = YES;
scrollView.showsHorizontalScrollIndicator = YES;
scrollView.delegate = self;
[self.view addSubview:scrollView];
//SCROLLVIEW End
//Poster Vertical Scroller STart
posterVerticalScroller = [[UIScrollView alloc] initWithFrame:CGRectMake(1024*3, 0, 1024, 768)];
[posterVerticalScroller setContentSize:CGSizeMake(1024, 768*3)];
posterVerticalScroller.bounces = NO;
posterVerticalScroller.pagingEnabled = YES;
[scrollView addSubview:posterVerticalScroller];
//Poster Vertical Scroller End
//Overview Start
overView = [[OverViewController alloc] initWithNibName:nil bundle:nil];
overView.view.frame = CGRectMake(1024, 0, 1024, 768);
[scrollView addSubview:overView.view];
//OverView End
//Landing start
landingView = [[LandingViewController alloc] initWithNibName:nil bundle:nil];
landingView.view.frame = CGRectMake(0, 0, 1024, 768);
[scrollView addSubview:landingView.view];
//Landing End
//360Controller Start
rotateController * rotateAnim = [[rotateController alloc] initWithNibName:nil bundle:nil];
rotateAnim.view.frame = CGRectMake(1024*2, 0, 1024, 768);
[scrollView addSubview:rotateAnim.view];
animateHouse = [[UIImageView alloc] initWithFrame:CGRectMake(100 + 1024*2, 200, 800, 450)];
// animateHouse.animationImages = rotateImg;
//animateHouse.animationDuration = 3.0;
// animateHouse.animationRepeatCount = 1;
// [animateHouse startAnimating];
animateHouse.userInteractionEnabled = YES;
animateHouse.image = [UIImage imageNamed:@"1.png"];
[self.view addSubview:animateHouse];
//360Controller End
//Poster 1 start
poster1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"poster01.png"]];
poster1.frame = CGRectMake(0, 0, 1250, 768);
[posterVerticalScroller addSubview:poster1];
poster1Items = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"poster01_items.png"]];
poster1Items.frame = CGRectMake(0, 0, 1024, 768);
[posterVerticalScroller addSubview:poster1Items];
//Poster 1 end
//Poster 2 Start
poster2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"poster02.png"]];
poster2.frame = CGRectMake(0, 768, 1162, 768);
[posterVerticalScroller addSubview:poster2];
poster2Items = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"poster02_items.png"]];
poster2Items.frame = CGRectMake(0, 768, 1024, 768);
[posterVerticalScroller addSubview:poster2Items];
//Poster 2 End
//Poster 3 Start
poster3 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"poster03.png"]];
poster3.frame = CGRectMake(0, 768*2, 1536, 768);
[posterVerticalScroller addSubview:poster3];
poster3Items = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"poster03_items.png"]];
poster3Items.frame = CGRectMake(0, 768*2, 1024,768 );
[posterVerticalScroller addSubview:poster3Items];
//Poster 3 End
//PageOne Start
UIImageView * pageOneBg = [[UIImageView alloc] initWithFrame:CGRectMake(1024*4, 0, 1024, 768)];
pageOneBg.image = [UIImage imageNamed:@"page360_landing_full.png"];
[scrollView addSubview:pageOneBg];
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(1024*4+750, 520, 200, 200);
[button setTitle:@"" forState:UIControlStateNormal];
[button addTarget:self action:@selector(loadingTEst) forControlEvents:UIControlEventTouchUpInside];
[scrollView addSubview:button];
//PageOne End
//Page 2
UIImageView *pageTwoBG = [[UIImageView alloc] initWithFrame:CGRectMake(1024*5, 0, 1024, 768)];
pageTwoBG.image = [UIImage imageNamed:@"Page06_Full.png"];
[scrollView addSubview:pageTwoBG];
UIButton *buttonTwo = [UIButton buttonWithType:UIButtonTypeCustom];
buttonTwo.frame = CGRectMake(1024*5+0, 550, 250, 100);
[buttonTwo setTitle:@"" forState:UIControlStateNormal];
[buttonTwo addTarget:self action:@selector(loadMap) forControlEvents:UIControlEventTouchUpInside];
[scrollView addSubview:buttonTwo];
//Page 2 END
【问题讨论】:
如果您评论所有内容但滚动视图会发生什么? 如果我注释掉 viewDidLoad 中除 scrollView 之外的所有内容。警告消失。 在 viewDidLoad 中可能不会直接出错,我看到您在这里实例化了其他视图控制器,它们中的任何一个都以模态方式呈现吗? 在发布代码的末尾,button 和 buttonTwo 被点击时,调用 loadingTEst 和 loadMap 呈现模态视图控制器。 【参考方案1】:尝试将您的动画代码放入 viewDidAppear。如果动画只需要在视图加载时运行,则使用布尔值检查视图是否已重新加载。
【讨论】:
以上是关于wait_fences:未能收到回复:10004003 - viewDidLoad的主要内容,如果未能解决你的问题,请参考以下文章
wait_fences:未能收到回复:10004003 - viewDidLoad
UIAlertView wait_fences:未能收到回复:10004003
wait_fences:未能收到回复:10004003(仅在 iPad 上)
wait_fences:未能收到回复:10004003 错误 - UIAlertView 与 UIActivityIndicatorView