krb
krb

Reputation: 16325

Using TTPhotoViewController without the Three20's URL system?

Whenever I add the TTPhotoViewController to my window , it appears without a top navigation bar and once I tap the image, the bottom navigation overlay and the status bar (the springboard one) will disappear permanently. How do I create a top navigation bar so I can add a button to hide the view after it was shown and how do I restore the overlays/toolbars after a tap?

[window addSubview:viewController.view];

I am not using Three20's URL mapping system because I see no point in doing that. I think that might be causing the problem but I think there is a sensible solution. Using the URL system is not a solution for me.

Upvotes: 0

Views: 988

Answers (3)

grobald
grobald

Reputation: 155

Why not just like this: - Create a ViewController inheriting from TTPhotViewController

MGSPhotoViewController *photoViewController = [[MGSPhotoViewController alloc] init];
[self.navigationController pushViewController:photoViewController animated:YES];
[photoViewController release];

it works like a charm.

One thing you need to consider:

If you com back to the previous view controller you'll need to change the tintColor of the NavigationBar because it remains black somehow.

Upvotes: 1

evanflash
evanflash

Reputation: 377

I know you've already solved this, but in case others run in to this thread: a way to avoid this issue without any custom code is to make sure TTPhotoViewController is the rootViewController of a UINavigationController

Upvotes: 0

krb
krb

Reputation: 16325

Solved by changing some of the view controllers code. For some reason the show/hide function was always being called with the 'hide' argument. No idea why though,

Upvotes: 0

Related Questions