Hi all,
I am developing a drum machine for iphone/ipad and want to use Sparrow for the UI. I am an experienced C programmer, but consider myself a beginner in objective C (so, the app is mostly written in C). I would like to include Retronyms' audio copy/audio paste viewController to copy/paste audio fragments to and from other apps. I've tried starting the viewController from a Sparrow button callback like this:
- (void)onTestButton:(SPEvent *)event
{
SPViewController *viewController = Sparrow.currentController;
NSString *fileToCopy = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"snare1.wav"];
// create the AudioCopyViewController
AudioCopyViewController* audioCopyController = [[AudioCopyViewController alloc] initWithPath:fileToCopy];
[viewController presentViewController: audioCopyController animated:YES completion:nil];
}
which causes an "Application tried to push a nil view controller on target <UINavigationController" message. Logically, no sign of audiocopy/paste on the screen.
Is an approach as above possible? And if so, what needs to be changed?
Any help would be more than welcome!
Marinus