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")

有帮助吗?

解决方案

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

其他提示

I guess your WikitudeARViewController delegate is application delegate.

1) Implement your own View controller , from where you want to launch AR Browser (on button click , preferably).

2) Instantiate WikitudeARViewController from your ViewController(button event) and making ViewController as delegate.

3) make view returned from [wikitudeAR start] to the ViewController.view (and not window.view).

Hope this helps.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top