Hi all!
My starting point:
- vuforia-sdk-ios-2-0-31
- UserDefinedTargets-2-0-7
I've tried to customize the UserDefinedTargets example with ARC, storyboard and UINavigationController. All works fine the first AR-flow, but when I come back, not immediately, but at some point the application crashes.
I've read many post regarding this in this forum, as these:
https://developer.vuforia.com/forum/ios/qcar-inside-uinavigationcontroller
https://developer.vuforia.com/forum/ios/integrating-sample-codes-tabbed-application
However, I've not found the solution.
I changed the AppDelegate to the storyboard-based style.
I only use storyboard for my stuff. I have a DetailViewController where I push to AR-flow:
DetailViewController.h
...
@class UDTParentViewController;
@interface DetailViewController : UIViewController
@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@property (strong, nonatomic) NSString *urlImage;
@property (strong, nonatomic) UDTParentViewController *udtViewController;
- (IBAction)test:(id)sender;
@end
DetailViewController.m
#import "DetailViewController.h"
@interface DetailViewController ()
@end
@implementation DetailViewController
@synthesize urlImage, imageView, udtViewController;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
udtViewController = [[UDTParentViewController alloc] initWithNibName:nil bundle:nil];
udtViewController.arViewRect = self.view.bounds;
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (void)viewDidUnload {
[self setImageView:nil];
[super viewDidUnload];
}
- (IBAction)test:(id)sender {
[self.navigationController pushViewController:udtViewController animated:YES];
}
@end
Can anyone help me?
Thanks in advance!!
Glad you found a solution, and many thanks for sharing :)
N