From 8d3f064957baf0037aa295f34cbc9a334e2c1972 Mon Sep 17 00:00:00 2001 From: wtimme Date: Tue, 18 Apr 2017 22:36:30 +0200 Subject: [PATCH] Fix PRAR-Example app that is failing to build (#54) With 3206bcad53460283762852c827f2fbcab9cdc526 the singleton was removed, but the example app had not been updated. --- PRAR-Example/PRAR-Example/Main Views/ARView.m | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/PRAR-Example/PRAR-Example/Main Views/ARView.m b/PRAR-Example/PRAR-Example/Main Views/ARView.m index b27f240..8c36b70 100644 --- a/PRAR-Example/PRAR-Example/Main Views/ARView.m +++ b/PRAR-Example/PRAR-Example/Main Views/ARView.m @@ -28,6 +28,11 @@ @interface ARView () +/** + The PRAR manager that the view uses. + */ +@property (nonatomic) PRARManager *prarManager; + @end @@ -83,21 +88,21 @@ - (void)prarGotProblem:(NSString*)problemOrigin withDetails:(NSString*)details { -(void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; - - [[PRARManager sharedManager] startARWithData:arData - forLocation:CLLocationCoordinate2DMake(currentLoc.coordinate.latitude, - currentLoc.coordinate.longitude)]; + + [self.prarManager startARWithData:arData + forLocation:CLLocationCoordinate2DMake(currentLoc.coordinate.latitude, + currentLoc.coordinate.longitude)]; } -(void)viewWillDisappear:(BOOL)animated { - [[PRARManager sharedManager] stopAR]; + [self.prarManager stopAR]; [super viewWillDisappear:animated]; } -(void)viewDidLoad { [super viewDidLoad]; - - [PRARManager sharedManagerWithRadarAndSize:self.view.frame.size andDelegate:self]; + + self.prarManager = [[PRARManager alloc] initWithSize:self.view.frame.size delegate:self showRadar:YES]; }