我正在使用QuickDialog
他们教程中的常规控制器代码:
QRootElement *root = [[QRootElement alloc] init];
root.title = @"Hello"
root.grouped = YES;
QSection *section = [[QSection alloc] init];
QEntryElement *hello = [[QEntryElement alloc] initWithTitle:@"Hello World" Value:@""];
[root addSection:section];
[info addElement:hello];
UINavigationController *navigation = [QuickDialogController controllerWithNavigationForRoot:root];
[self presentModalViewController:navigation animated:YES];
如何在导航栏中添加“取消”按钮?我试过了:
navigation.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel handler:^(id sender){
[self.navigationController.modalViewController dismissModalViewControllerAnimated:YES];
}];
......但这没有用。有什么建议么?