[英]Wikitude SDK remove from superview
我已經實現了 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];
}
我如何將 go 回到我的 MainViewController 視圖? (我想從 object "custombutton" 調用它)
我猜你的WikitudeARViewController
委托是應用程序委托。
1) 實現您自己的視圖 controller,從您要啟動 AR 瀏覽器的位置(最好單擊按鈕)。
2)從您的 ViewController(按鈕事件)中實例化 WikitudeARViewController 並將 ViewController 設為委托。
3) 使視圖從 [wikitudeAR start] 返回到 ViewController.view(而不是 window.view)。
希望這可以幫助。
你可以使用 CustomMenuButtonDelegateImpl1.m
@implementation CustomMenuButtonDelegateImpl1
- (void) customMenuButtonPressed:(WTPoi *)currentSelectedPoi {
//NSLog(@"addpoi");
[[WikitudeARViewController sharedInstance] hide];
[UIApplication sharedApplication].statusBarHidden = NO;
}
@end
而且效果很好
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.