For
[self presentModalViewController:mediaPicker animated:YES]
To work, I have to be a viewcontroller. I'm worried that you just changed the base class to avoid compiler errors, as this means that you are not really creating the self.
So how do you initialize the SpeakHereController? As a view controller, this will usually be through the designated initializer, which for the UIViewController, of course, is initWithNibName: bundle:
You can find the documentation for the UIViewController .
Regarding the C ++ issue. Although you can mix objective-c and C ++ as you suggest, I would recommend that you encapsulate your C ++ code in your own class, rather than sprinkling it around your viewcontroller code. This will make it more convenient for the future.
source share