views:

134

answers:

0

My problem is that I have a Register Controller and a Login Controller. The Login Screen displays a Login Screen or a Logout Screen depending if a user is logged in. Now when a user registers, does not close the app, and then goes to the Login Screen it will still display a Login Screen, although there is a logged in user already. This is because the Screen is created when the application loads and does not change afterwards.

I tried doing this:

- (id)init {
if (self = [super init]) {
    [self invalidateModel];
    [self reload];

but that did not work, since it is only called on the first init.

then i tried:

- (void)viewDidLoad {
[self invalidateModel];
[self reload];
}

But that method had the same problem.

Then I found this method:

- (TTNavigationMode)navigationModeForURL:(NSString*)URL;

with the following options:

 typedef enum {
  TTNavigationModeNone,
  TTNavigationModeCreate,            // a new view controller is created each time
  TTNavigationModeShare,             // a new view controller is created, cached and re-used
  TTNavigationModeModal,             // a new view controller is created and presented modally
  TTNavigationModeExternal,          // an external app will be opened
} TTNavigationMode;

It seems like TTNavigationModeCreate would be the right thing to use, but I have no clue how to use it.

Any help? Thnx.