2012-05-15 3 views
0

처음에는 화면이 꺼져있는 UITableView이 있고 단추를 누르면 뷰의 중심점이 오른쪽으로 이동하고 화면에서 다시 테이블 뷰가 이동합니다. Facebook의 메뉴와 비슷합니다.didSelectRowAtIndexPath는 화면 밖으로 이동할 때 실행되지 않습니다.

//Slide in Side Menu 
[UIView beginAnimations:nil context:nil];  
[UIView setAnimationDuration:.75]; 

self.view.center = CGPointMake((cgSize.width/2)+10, 165); 

[UIView setAnimationDelegate:self]; 
[UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];  

[UIView commitAnimations]; 

내 문제는 내있는 tableview의 왼쪽 상단 모서리가 (화면 꺼짐) 음의 숫자 didSelectRowAtIndexPath가 발생하지 않습니다이 때 선택은 어떤 이유로 비활성화되어 있다는 점이다.

menuTableView = [[UITableView alloc] initWithFrame:CGRectMake(-350, 0, 350, cgSize.height-50) 
               style:UITableViewStylePlain]; 

내가 0 -350을 변경, 그것은 다음과 같이 완벽하게 작동합니다 :

menuTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 350, cgSize.height-50) 
               style:UITableViewStylePlain]; 

어떤 아이디어?

+0

이 작업을 수행 할 때 menuTableView = [[UITableView alloc] initWithFrame : CGRectMake (-350 , 0, 350, cgSize.height-50) 스타일 : UITableViewStylePlain]; , 전체 프레임이 보이지 않아야합니다. 테이블 셀을 어떻게 누르십니까? – zahreelay

답변

0

테이블보기의 프레임이보기의 표준 프레임 밖에 있으므로 입력이 테이블보기로 전달되지 않습니다. 부모 뷰에 포함 된 테이블 뷰의 경계를 유지하는 방법을 알아야하고 원하는대로 애니메이션을 적용하면서

+0

내보기를 모두 개별적으로 이동 한 다음 UITableView를 이동할 때 작동합니다. 그냥 self.view.center = CGPointMake ((cgSize.width/2) +10, 165)를 사용한다; 작동하지 않습니다. – DavidB

관련 문제