Note that there are some explanatory texts on larger screens.

plurals
  1. POBack button does not appear in navigation bar until you rotate
    primarykey
    data
    text
    <p>I have three view controllers: <code>A</code> -> <code>B</code> -> <code>C</code> managed by a navigation controller. <code>A</code> is a transient view controller. It asks the server for something. If the server says everyhing is OK, then <code>A</code> pushes <code>B</code> onto the stack. <code>B</code> must hide the back button because I don't want users to manually go back to <code>A</code>. </p> <pre><code>// B view controller - (void)viewDidLoad { [super viewDidLoad]; self.navigationItem.hidesBackButton = YES; self.title = @"B"; } </code></pre> <p><code>B</code> then pushes <code>C</code> onto the stack when the user taps a table cell.</p> <pre><code>// B view controller - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { C *c = [[C alloc] initWithStyle:UITableViewStyleGrouped ]; [self.navigationController pushViewController:c animated:YES ]; [c release]; } </code></pre> <p>.</p> <pre><code>// C view controller - (void) viewDidLoad { [super viewDidLoad]; self.navigationItem.hidesBackButton = NO; self.title = @"C"; } </code></pre> <p>If all goes well, the flow should look like this:</p> <pre><code>------------- ------------- ------------- |_____A_____| |_____B ____| | &lt;B|__ C___| | | =&gt; | | =&gt; | | | loading...| | cells | | detail | | | | | | | ------------- ------------- ----------- </code></pre> <p>For some reason, <code>C</code> does not show a back button to go back to <code>B</code> <em>until</em> I rotate the device. Once rotated, the back button appears in all orientations. The problem seems to stem from <code>B</code> hiding the back button and <code>C</code> trying to reveal it again, because If I don't let <code>B</code> hide it, I don't have this problem. So how do I get C to show the back button without forcing the user to rotate the device like a monkey?</p> <h1>Update</h1> <ul> <li>Broken on two different Verizon iPhone 4 both on iOS 4.2.10</li> <li>Fine on AT&amp;T iPhone 3GS on iOS 5.0 </li> <li>Fine on AT&amp;T iPhone 4 on iOS 4.3</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload