I am using QuickDialog to push a login form. Everything is working except the view controller can not be dismissed. The code like this:
- (void)onLogin:(QButtonElement *)buttonElement
{
[self loading:YES];
Info *info = [[Info alloc] init];
[self.root fetchValueUsingBindingsIntoObject:info];
[self.client loginWithUsername:info.login password:info.password onSuccess:^(NSDictionary *result) {
NSLog(@"user signed in");
[self loading:NO];
[self dismissViewControllerAnimated:YES completion:nil];
} onFailure:^(NSError *error) {
NSLog(@"login error");
}];
}
And I am using these codes to push this view controller
QRootElement *root = [[QRootElement alloc] initWithJSONFile:@"loginform"];
LoginController *loginController = (LoginController *)[QuickDialogController controllerForRoot:root];
[self.navigationController pushViewController:loginController animated:YES];