I collect the program in a third-party engine, which then flips the archive in Xcode. There is no experience with objC, so I apologize in advance for the possible stupidity written. The problem is that the main View, which the engine offers to work with, is based on EAGLView. And when you try to load and display content there with the help of some third-party frameworks, an error related to the framebuffer comes out.

extern UIView *g_glView; // это view движка [theInterstitiel show:g_glView]; // ->> краш 

It probably needs to be displayed in a simple View without OpenGL. If you write:

 [theInterstitiel show:self.view]; 

That banner loads perfectly, I hear sounds, but I don’t see the banner itself. Is it possible to programmatically add a view that is not related to the EAGLView and raise it to the very top? There is no access to UIViewController.h, etc., everything is closed.

    1 answer 1

    Well, if you just need to create a UIView programmatically and add it, then try this:

     UIView *view = [[UIView alloc] initWithFrame:CGRectMake(100, 150, 200, 50)]; view.backgroundColor = [UIColor redColor]; [self.view addSubView:view]; 
    • one
      Thank! It took more to add this, so that the view would appear above the main one: UIWindow * promowindow = [[UIApplication sharedApplication] keyWindow]; [promowindow addSubview: view]; - Vit
    • Yes, I forgot to specify. ( - Orest Mykha
    • some dumb practice of adding view to keyWindow - Max Mikheyenko
    • Tell me how best to add? This view is planned to be used once a couple of seconds. Then I delete it like this: [view removeFromSuperview]; - Vit