Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As mentioned above, you probably want to change your <code>performSelector</code> command to:</p> <pre><code>[self performSelector: @selector(pushSecondController) withObject: nil afterDelay: 5.0f]; </code></pre> <p>because you want it to call your <code>pushSecondController</code> method, and not <code>pushViewController:animated:</code>.</p> <p>Regarding your second question: the difference between <code>methodName</code> and <code>methodName:</code> is that the <code>:</code> at the end of <code>methodName:</code> signifies that this method takes a parameter. So, you could have the following methods:</p> <pre><code>- (void)listItems { // ... } - (void)insertItem:(NSDictionary *)item { // ... } </code></pre> <p>When passing a reference to them into <code>@selector</code>, for the first method you'd just do <code>@selector(listItems)</code>, because it takes no parameters, and for the latter you'd do <code>@selector(insertItem:)</code> because it takes a parameter.</p> <p><strong>UPDATE</strong></p> <p>Just saw your <code>applicationDidLaunch</code> code. You probably want to rearrange things so that you add your <code>ViewController</code> to your <code>UINavigationController</code>, and then set the <code>UINavigationController</code> as the rootViewController of your window. Like so:</p> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil]; self.navigationController = [[UINavigationController alloc] initWithRootViewController:self.viewController]; self.window.rootViewController = self.navigationController; [self.window makeKeyAndVisible]; return YES; } </code></pre>
 

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