I created two ViewControllers (Xcode 4 => Storyboard). After that I created two UIViewSubclasses, called PlayOutControlViewController.h and TVOutViewController.h.
I want to display a video on an external Display, so I tried the following:
(MediaPlayer.framework added, Changed the class of my UIViewSubclasses to PlayOut… and TVOut… – Controller.h)
PlayoutViewController.m
[TVOutViewController.view addSubview: MediaPlayer.view];
//Got Error: Property view not found on object of type TVOutViewController
[TVOutViewController addSubview: MediaPlayer.view]; //Got an Error
//Got Error: No known class method for selector addSubview
Sorry, I know what the Errors mean, but not how to fix them.
Thanks in advance!
P.S. I’m in the PlayoutViewController.m, where:
[self.view addSubview: (anyUIView)];
//works
//and
[PlayoutViewController.view addSubview: (anyUIView)];
//won't work.
… Thank you!
Thanks so far.
My TVOutViewController is a subclass of UIViewController, as described here:
I added a UIView to the TVOutViewController in InterfaceBuilder. Do I have to do something else to be able to do like:
Second question:
If I declare a method in TVOutViewController.m, like:
Why am I not able to call it in the PlayoutControlViewController.m via
I added
to the PlayOutViewController.m file.
Thank you all in advance!
OK SOLVED:
You were on the right track:
I forgot to initialize the object. Now it works like a charm!