Search code examples
iphoneviewaugmented-realitywikitude

Wikitude SDK remove from superview


I have implement Wikitude SDK and I manage to initialize using this code:

-(IBAction)launchAR:(id)sender{
        wikitudeAR = [[WikitudeARViewController alloc] initWithDelegate:self applicationPackage:nil applicationKey:nil applicationName:nil developerName:nil];  
}

- (void) verificationDidSucceed {

    BuddyFinderAppDelegate *appDel = (BuddyFinderAppDelegate *)[[UIApplication sharedApplication] delegate];


    [appDel.window addSubview: [wikitudeAR start]];
    [window makeKeyAndVisible]; 
}

How I will go back to my MainViewController View? (I want to call it from object "custombutton")


Solution

  • you can use CustomMenuButtonDelegateImpl1.m

    @implementation CustomMenuButtonDelegateImpl1
    
    - (void) customMenuButtonPressed:(WTPoi *)currentSelectedPoi {
        //NSLog(@"addpoi");
    
    
    
        [[WikitudeARViewController sharedInstance] hide];
        [UIApplication sharedApplication].statusBarHidden = NO;
    
        }
    
    
    @end
    

    and it woroks very well