In Three20, I've a custom cell which includes a UIButton. I'm firing "tap" method when UIButton is tapped like this:
UIButton* cevapla=[UIButton buttonWithType:UIButtonTypeCustom];
[cevapla addTarget:self
action:@selector(tap:)
forControlEvents:UIControlEventTouchUpInside];
and
-(void)tap:(id)sender {
TTURLAction* action=[TTURLAction actionWithURLPath::@"tt://secondviewcontroller/"
];
[action applyAnimated:YES];
[[TTNavigator navigator] openURLAction:action];
}
It's ok so far. SecondViewController is loaded with animation. But in SecondViewController, when the user clicks on another link, which opens another view controller, there is no a "back" button. If the link in the second view controller begins with "http://", it opens internal web browser "without back button", and it is not possible to go elsewhere and the user has to reopen the app.
What's wrong with this tap method?
Note: Instead of [[TTNavigator navigator] openURLAction:action];
I tried [[TTNavigator navigatorForView:self.superview] openURLAction:action];
but there is no change.
It has been solved. My SecondViewController's title property was set to @"" (empty string). When this property is not set, navigation controller cannot find a text to write into the back button, so it simply does not show it. Expectable, but weird. If title property is nil, it shows a default back text but if it is an empty string, it does not show any button. Actually, nobody sets title to an empty string. I had set it to empty for debugging purposes.