开发者

TTDefaultStyleSheet styling applies late within the aplication

Good Day guys.. I was wondering if you could help me. The styling from my stylesheet is applied only when the application reaches the very last possible view (My application is 3 views deep; log-in, menu, and a profile view)in the navigation path. When the application reaches the profile vie开发者_运维问答w, then and there does the styling gets applied into the application and everything is supposed to be styled as it should be. I've instantiated the stylesheet object in my application's appdelegate applicationDidFinishLaunching method.

- (void)applicationDidFinishLaunching:(UIApplication *)application {

TTNavigator *navigator = [TTNavigator navigator]; navigator.window = _window;

[TTStyleSheet setGlobalStyleSheet:[[[BNDefaultStylesheet alloc] init] autorelease]]; 

TTURLMap *map = navigator.URLMap;
[map from:@"tt://startView"
 toSharedViewController:[StartViewController class]];
[map from:@"tt://profilePage" 
toSharedViewController:[JumpsiteProfilePage class]];
[map from:@"tt://mainMenu" 
toSharedViewController:[MenuViewController class]];


[navigator openURLAction:[TTURLAction actionWithURLPath:@"tt://startView"]];
//[navigator openURLAction:[TTURLAction actionWithURLPath:@"tt://characterList"]];



// Override point for customization after application launch
[_window makeKeyAndVisible];}


The Stlyesheet will apply right away if the ViewController is a TTViewController...

if your view is loaded from a nib, just add this in your view controller viewDidLoad method [[NSBundle mainBundle] loadNibNamed:@"YourNibName" owner:self options:nil];

I think, there's something in the Three20 that will have a late update of the styles when you're just subclassing the UIViewController

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜