In the iOS Math Widget, I'm having trouble transitioning between different view controllers and scenes. I want to call the presentViewController method and pull up a UIWebView after I tap a bar button item on the Math Widget, but nothing is happening. What's a solution to fix this?
My code is below:
(in the viewDidLoad method)
self.wolframAlphaExportBarButton = [[UIBarButtonItem alloc] initWithImage: [UIImage imageNamed: @"wolframalpha_logo"] style: UIBarButtonItemStyleDone target: self action: @selector(presentExportViewController)];
(in the presentExportViewController)
WolframWebViewController *wolframWebViewController = [[WolframWebViewController alloc] init];
[self presentModalViewController: wolframWebViewController animated: YES];
Thanks for the help,
I don't have a specific answer for your question, but firstly it could be great to check that the method
presentExportViewController is properly called and does not generated any error message (add a breakpoint or a log 'NSLog').
Moreover, the method
presentModalViewController seems deprecated and should be replaced by something like:
presentViewController:animated:completion:. You may find more details about the subject on Apple developer website: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/
Hope it helps!