Note that there are some explanatory texts on larger screens.

plurals
  1. PONavigating from one UITableView to another inside appDelegate
    text
    copied!<p>The first UITableView is presented inside a Popover that is called from the RootViewController of the application. </p> <p>I need to navigate to another UITableView inside the same popover. This is easy to do if you just instance an object of the second UITableView and push it from the first one.</p> <p>In the next paragraph I write as taking for granted some facts, please correct me if I'm wrong.</p> <p>The problem here is that this process should be done inside the appDelegate. This is because I'm implementing Dropbox API and I need the pushViewController to be done immediately after the login process is done, which means the navigation through UITableViews has to be done inside of the application:handleOpenURL. I asume that application:handleOpenURL has to be called right there and that's why I also asume the pushViewController has to be done there in order to have the navigation done after the Dropbox API validation window is presented, without having to make the user do anything else.</p> <p>This is how my code looks like:</p> <p>AppDelegate.h</p> <pre><code>@interface AppDelegate : NSObject &lt;UIApplicationDelegate&gt;{ UINavigationController *navigationController; NSString *relinkUserId; UIWindow *window; TableViewControllerForStorageList *rootViewController; ViewController *viewController; } @property (nonatomic, strong) IBOutlet UIWindow *window; @property (nonatomic, strong) IBOutlet UINavigationController *navigationController; @property (nonatomic, strong) IBOutlet TableViewControllerForStorageList *rootViewController; @property (nonatomic, strong) IBOutlet ViewController *viewController; </code></pre> <p>AppDelegate.m</p> <pre><code>- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { if ([[DBSession sharedSession] handleOpenURL:url]) { if ([[DBSession sharedSession] isLinked]) { [(TableViewControllerForStorageList *)self.window.rootViewController PushView]; } return YES; } return NO; } </code></pre> <p>TableViewControllerForStorageList.h</p> <pre><code>-(void)PushView; </code></pre> <p>TableViewControllerForStorageLost.m</p> <pre><code>-(void)PushView { TableViewControllerIpadStorage *tableViewControllerIpadStorage = [[TableViewControllerIpadStorage alloc]initWithNibName:@"TableViewControllerIpadStorage" bundle:Nil]; [self.navigationController pushViewController:tableViewControllerIpadStorage animated:YES]; } </code></pre> <p>Off course I got sure that Application:HandleOpenURL is running, but when calling PushView from there the error is [ViewController PushView]: unrecognized selector sent to instance</p> <p>So, how can make the navigation be done from there? Which basics about objective c am I missing?</p>
 

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