开发者

Parameter in TTURLMap?

I have a Facebook-Like MainScreen. For my SettingsViewController I need to pass a object for my delegate throughout the method.

How to do this?

Here is my code until now:

TTURLMap* map = navigator.URLMap; 

 [map            from: @"tt://einstellungen"
              parent: @"tt://launcher"
    toViewController: [SettingsViewControlle开发者_JS百科r 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 I would have:

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

How to have this here?


If you need the controller as an object, you can initialize it and use the object reference in the TTURLMap:

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


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜