Reply to comment

pushViewController problem

Sometimes, I want to push some view controller into the navigation controller before the view is shown, then I called

[ self.navigationController pushViewController:[rootController autorelease] animated:NO]; // push root view controller

Where animated is set to NO to prevent animation. However, the above code doesn't work. When clicking back button, the view cannot return to previous view. After spending many hours, I found that it may be a bug in the SDK. If I set animated to YES, everything works fine:

[ self.navigationController pushViewController:[rootController autorelease] animated:YES]; // push root view controller

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.