Here is my situation:
I have a TaskListViewController(UITableView) which need Internet.
So I used AFNetworking to do some login work(with demo account and password) before the TaskList is showed.
Now I need to let the user set their account and password.
So I just want to present a Modal View(ZTCUserSettingsViewController) before login.
And I cost a lot time, it still doesn't work.
Is there any way to solve this?
Thank you.
ZTCAPIClient : AFHTTPClient
ZTCTaskListViewController : UITableViewController
code
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES];
[ZTCAPIClient login];
UITableViewController *viewController = [[ZTCTaskListViewController alloc] initWithStyle:UITableViewStylePlain];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:viewController];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = nav;
[self.window makeKeyAndVisible];
return YES;
}