2011-04-29 5 views
0
여기

에 터치 이벤트를 처리하는 내 코드는 다음과 같습니다방법 서브 뷰

MAINVIEW :

NSArray *btArray = [NSArray arrayWithObjects:@"1",@"1",@"1",@"1",@"1",nil]; 
ButtonBarComponent *bottomeButtonBar = [[ButtonBarComponent alloc] initButtonBarComponentWithButtonArray:btArray]; 
bottomeButtonBar.frame = CGRectMake(0, 340, 320, 200); 
[self.view addSubview:bottomeButtonBar]; 

서브 뷰 :

-(id)initButtonBarComponentWithButtonArray:(NSArray *)btArray { 
self = [[UIView alloc] initWithFrame:CGRectMake(0, 340, 320, 200)]; 
self.backgroundColor = [UIColor whiteColor]; 
} 

그런데 왜 내가 터치 이벤트에서 코드를 실행 캔트?

+0

Java입니까? 목표 C? 어떤 언어? –

+0

Xcode. 아이폰 물건. – Mikecito

+0

initButtonBarComponentWithButtonArray 메서드에서 배열을 사용하고있는 곳은 어디입니까? –

답변

1

귀하의보기 및 하위보기에 대해 사용자 상호 작용을 설정해보십시오.

+0

이 혼자 해결되었습니다. 나는 – FengChui

관련 문제