0

I am currently loading another viewcontroller on this code

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

NewViewController *controller = [[NewController alloc]init];
controller.licensed =@"NO";
controller.delegate = self;
self.window.rootViewController = controller;
self.window.backgroundColor = [UIColor clearColor];
[self.window makeKeyAndVisible];

But the problem is when the NewViewController loads. The subviews of the previous view controller is in the background of the NewViewController

[self.rectHolder performSelectorOnMainThread:@selector(removeFromSuperview) withObject:nil waitUntilDone:NO];
[self.btnSignup performSelectorOnMainThread:@selector(removeFromSuperview) withObject:nil waitUntilDone:NO];
[self.view removeFromSuperview];

I tried to use this, but the subviews is still in the background of the new view controller

Edit:

I also tried to use this

NewViewController* viewController = [[NewViewController alloc] init];
viewController.licensed = @"NO";
[self presentViewController:viewController animated:YES completion:nil];

But the subViews of my previous viewcontroller is still in the background

0 Answers0