0

Okay so I know that you can embed a ViewController inside a view. But the situation I have is a little different

I have an app which is using an external monitor. When the monitor is connected, I'd like to display the ExternalMonitor ViewController inside another view on my iPad screen. Like a Live Preview. I can't work out how to get it to display the ViewController on both my ExternalMonitor and my PreviewView at the same time.

Basically: 1 ViewController displayed in 2 places at the same time, scaled to fit the two different views.

Is this possible. Can someone point me in the right direction?

I apologise if my terminology isn't right. I am quite new to Xcode and swift.

wades
  • 250
  • 2
  • 10
  • 1
    you can mirror the viewController to an external display. Here is a really easy example for you. http://www.spazstik-software.com/blog/article/how-to-display-custom-content-on-a-external-screen-from-a-ios-device – Galo Torres Sevilla Jan 11 '19 at 12:14

2 Answers2

0

While someone might offer a better solution to this, you might try displaying 2 instances of the same view controller class in 2 different places. It won't work of course, if this controller should respond to user actions. They will not be in sync that way.

Yevgeniy Leychenko
  • 1,287
  • 11
  • 25
0

You can use a common UIView in multiple view controllers for e.g we do use in making common headers and footers , but according to my point of view this is not possible to use 2 instances of a view controller at the same time . It will got clashed , may be it will work sequencely one after another but not on same time.

Diksha235
  • 442
  • 7
  • 17