2011-08-30 1 views
0

페이스 북과 같은 메인 화면이 있습니다. 내 SettingsViewController에 대해 메서드 전체에서 대리자에 대한 개체를 전달해야합니다.TTURLMap의 매개 변수?

어떻게 하시겠습니까? 여기

지금까지 내 코드입니다 :

TTURLMap* map = navigator.URLMap; 

[map   from: @"tt://einstellungen" 
       parent: @"tt://launcher" 
    toViewController: [SettingsViewController class] 
      selector: nil 
      transition: trans]; 



NSMutableArray *array = [NSMutableArray arrayWithObjects: 
        [self launcherItemWithTitle:@"Einstellungen" 
             image:@"bundle://animexx-72.png" 
              URL:@"tt://einstellungen"]     
        , nil]; 

launcherView.pages = [NSArray arrayWithObjects: 
         array 
         , nil]; 

은 Normaly 나는 것 :

SettingsViewController *controller = [SettingsViewController alloc] init]; 
controller.delegate = self; 

어떻게 여기을 가지고? 당신이 개체로 컨트롤러를해야하는 경우

답변

1

, 당신은 그것을 초기화하고 TTURLMap의 객체 참조를 사용할 수 있습니다

SettingsViewController* controller = [[SettingsViewController alloc] init]; 
controller.delegate = self; 


[map   from: @"tt://einstellungen" 
       parent: @"tt://launcher" 
    toViewController: controller 
      selector: nil 
      transition: trans];