2012-08-12 3 views
3

나는이 오류가 발생하고 호기심을 불러 일으켰습니다. 내가 읽은 바로는 일반적으로 viewDidLoad 내부에 애니메이션을 적용하거나 UIAlertView를 차단하는 것입니다.wait_fences : 답장을받지 못했습니다 : 10004003 - viewDidLoad

1. scrollView 블록의 코드를 주석 처리하면 오류가 사라집니다. 내가 페이지로 시작을 한 쪽 끝을있는 ScrollView 코드를 떠나 360Controller에서 주석 2.If

. 경고가 사라집니다.

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 

} 
+0

모든 내용에 주석을 달고 스크롤보기를 사용하면 어떻게됩니까? – CodaFi

+0

scrollView를 제외하고 viewDidLoad의 모든 것을 주석 처리합니다. 경고가 사라집니다. – Klipnov

+0

viewDidLoad에서 직접 문제가 발생하지 않을 수도 있습니다. 여기에서 추가보기 컨트롤러를 인스턴스화하는 중이며, 그 중 하나가 모달로 표시되고 있습니까? –

답변

1

viewDidAppear에 애니메이션 코드를 넣으십시오. 뷰가로드 될 때 애니메이션 만 실행해야하는 경우 부울을 사용하여 뷰가 다시로드되었는지 확인합니다.

관련 문제