2011-11-24 3 views
-2

응용 프로그램 didFinishLaunchingWithOptions에서 직접 아래 메서드를 호출하려고합니다.단추 작업 대신 직접 메서드를 호출하는 방법

현재이 작업은 버튼으로 실행됩니다. 단추없이 이것을 어떻게 호출 할 수 있습니까? 이 방법은 보낸 사람 PARAM를 사용하는 경우

- (IBAction)toggleVertical:(id)sender 
{ 
    [splitController toggleSplitOrientation:self]; 
    [self configureView]; 
} 
+1

음 ...를 호출하여. .. – Macmade

답변

2

그냥

[self toggleVertical:nil]; 

로 전화, 당신은 당신의있는 UIButton의 참조 내부에 넣어해야합니다

[self toggleVertical:self.myButton]; 
관련 문제