Embed a native UIView with UIViewComponent

Hi friends!

I'm trying to embed a native UIView with UIView Component class but I don't know how to do it.

May I have to link an objective-C .m file or header with my c++ juce class?

In this case, how can I do it?

Is there another way to do it?

Can anyone share a few code lines to show me the right way?

Thank you in advance... I'm really lost and sad :(
 

For the moment I have this code:

UIViewComponent UIVC;

UIVC.setOpaque(true);

addAndMakeVisible (UIVC);

UIVC.setView (nullptr);

UIVC.setBounds(0, 20, 320, 50);

Where is that code? It looks like you're creating your component on the stack, which will get deleted immediately when the function or scope exits, so will never actually get anywhere near the screen.

---

Sorry, but I don't have time to dig through all that code. You need to D.R.Y it!