Three20 - open URL for general view controller

I know that if you map the url to from:toViewController:, then open that url will create a new view controller, and if used from:toSharedViewController, then the shared instance will be used.

But for example

 [map from:@"tt://tabbar/(initWithString:)" toSharedViewController:[MyTabbarController class]];
 TTOpenURL(@"tt://tabbar/string");

It will cause something similar to

 [[MyTabbarController alloc] initWithString:@"string"]

But what happens if TTOpenURL(@"tt://tabbar/somethingelse")the call is later? Since a shared object is used, will the call be called initWithString:twice in the same instance?

+3
source share
1 answer

The answer is no. Ie, init will not be called by an already initialized instance, but a new instance will be allocated and initialized.

, Three20 URL-, "tt://tabbar/string", "tt://tabbar/somethingelse", TTURLMap, , . , , Three20 1.0.3. , .

-, , , , , Three20. , "" TTURLMap, , .

+2

All Articles