我正在使用 QuickDialog 推送登录表单。一切都在工作,除了视图控制器不能被解雇。像这样的代码:
- (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");
}];
}
我正在使用这些代码来推送这个视图控制器
QRootElement *root = [[QRootElement alloc] initWithJSONFile:@"loginform"];
LoginController *loginController = (LoginController *)[QuickDialogController controllerForRoot:root];
[self.navigationController pushViewController:loginController animated:YES];