简体   繁体   English

Wikitude SDK 从超级视图中删除

[英]Wikitude SDK remove from superview

I have implement Wikitude SDK and I manage to initialize using this code:我已经实现了 Wikiitude SDK 并且我设法使用以下代码进行初始化:

-(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?我如何将 go 回到我的 MainViewController 视图? (I want to call it from object "custombutton") (我想从 object "custombutton" 调用它)

I guess your WikitudeARViewController delegate is application delegate.我猜你的WikitudeARViewController委托是应用程序委托。

1) Implement your own View controller, from where you want to launch AR Browser (on button click, preferably). 1) 实现您自己的视图 controller,从您要启动 AR 浏览器的位置(最好单击按钮)。

2) Instantiate WikitudeARViewController from your ViewController(button event) and making ViewController as delegate. 2)从您的 ViewController(按钮事件)中实例化 WikitudeARViewController 并将 ViewController 设为委托。

3) make view returned from [wikitudeAR start] to the ViewController.view (and not window.view). 3) 使视图从 [wikitudeAR start] 返回到 ViewController.view(而不是 window.view)。

Hope this helps.希望这可以帮助。

you can use CustomMenuButtonDelegateImpl1.m你可以使用 CustomMenuButtonDelegateImpl1.m

@implementation CustomMenuButtonDelegateImpl1

- (void) customMenuButtonPressed:(WTPoi *)currentSelectedPoi {
    //NSLog(@"addpoi");



    [[WikitudeARViewController sharedInstance] hide];
    [UIApplication sharedApplication].statusBarHidden = NO;

    }


@end

and it woroks very well而且效果很好

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM