简体   繁体   中英

iOS SDK : Push Issue Creation rather than present 'modally'

Using the Zendesk SDK for iOS an issue creation view controller can be presented as follows:

    [ZDKRequests showRequestCreationWithNavController:self.navigationController];

What is the easiest / highest level of abstraction for pushing the same view controller, rather than presenting it 'modally' ?

The ZDKCreateRequestViewController is not designed to be pushed but you can push it by calling

ZDKCreateRequestViewController *viewController = [[ZDKCreateRequestViewController alloc] init];
[self.navigationController pushViewController:viewController animated:YES];

But you will need to remove the the left navBarButton as it won't work because it is trying to dismiss modally. You can do this by setting viewController.navigationItem.leftBarButtonItem = nil before you push and this will then allow the view controller to generate a navBarButton that will pop the view controller.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM