From 3cb55e0ff6cb0d86fb623ad16842a74c4af23718 Mon Sep 17 00:00:00 2001
From: Siqi LIU <me@siqi.fr>
Date: Mon, 16 Sep 2013 22:03:54 +0200
Subject: retain timer running state when auto-start then didAppear

Change-Id: I4b4b327643919a9a6266f51e3e0bc8791ad27fbe
---
 ios/iosremote/iosremote/Timer.m                       |  3 +--
 ios/iosremote/iosremote/slideShowSwipeInList_iphone.m |  2 --
 ios/iosremote/iosremote/slideShow_vc_iphone.m         | 19 -------------------
 3 files changed, 1 insertion(+), 23 deletions(-)

(limited to 'ios/iosremote')

diff --git a/ios/iosremote/iosremote/Timer.m b/ios/iosremote/iosremote/Timer.m
index 269ff9c33efb..e493a9681d72 100644
--- a/ios/iosremote/iosremote/Timer.m
+++ b/ios/iosremote/iosremote/Timer.m
@@ -55,7 +55,6 @@ int vibrationCount;
     self.timeLabel = timeLabel;
     
     [self setupActions];
-    [self clear];
     return self;
 }
 
@@ -67,7 +66,7 @@ int vibrationCount;
     self.timeLabel = (UILabel *)[[cell viewWithTag:9] viewWithTag:1];
 
     [self setupActions];
-    [self clear];
+//    [self clear];
 }
 
 - (void) setupActions
diff --git a/ios/iosremote/iosremote/slideShowSwipeInList_iphone.m b/ios/iosremote/iosremote/slideShowSwipeInList_iphone.m
index f3d0637a4205..deb7a832675e 100644
--- a/ios/iosremote/iosremote/slideShowSwipeInList_iphone.m
+++ b/ios/iosremote/iosremote/slideShowSwipeInList_iphone.m
@@ -79,8 +79,6 @@ dispatch_queue_t backgroundQueue;
     [self.stopWatch updateStartButtonIcon];
     [self.timer updateStartButtonIcon];
     if ([self.comManager.interpreter.slideShow size] > 0) {
-        [self.stopWatch updateStartButtonIcon];
-        [self.timer updateStartButtonIcon];
         NSIndexPath *indexPath = [NSIndexPath indexPathForRow:self.slideshow.currentSlide
                                                     inSection:1];
         [self.tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
diff --git a/ios/iosremote/iosremote/slideShow_vc_iphone.m b/ios/iosremote/iosremote/slideShow_vc_iphone.m
index 9a7bddf3cd6c..b97ea0c869b5 100644
--- a/ios/iosremote/iosremote/slideShow_vc_iphone.m
+++ b/ios/iosremote/iosremote/slideShow_vc_iphone.m
@@ -34,7 +34,6 @@
 @property (nonatomic, strong) id slideShowFinishedObserver;
 @property (nonatomic, strong) SlideShow* slideshow;
 
-@property BOOL pointerCalibrationOn;
 @property CGPoint refLeftUpperGravity;
 @property CGPoint refRightUpperGravity;
 @property CGPoint refRightLowerGravity;
@@ -53,20 +52,6 @@
 
 #pragma mark - Pointer
 
-- (CMMotionManager *)motionManager
-{
-    CMMotionManager *motionManager = nil;
-
-    id appDelegate = [UIApplication sharedApplication].delegate;
-
-    if ([appDelegate respondsToSelector:@selector(motionManager)]) {
-        motionManager = [appDelegate motionManager];
-    }
-
-    return motionManager;
-}
-
-// Not localized for now since this is subject to fundemental changes
 - (IBAction)pointerAction:(id)sender {
     if ([self.touchPointerImage isHidden]){
         [self.slideshow getContentAtIndex:self.slideshow.currentSlide forView:self.touchPointerImage];
@@ -198,7 +183,6 @@
                                                             action:@selector( revealToggle: )];
     self.revealViewController.navigationItem.leftBarButtonItem = self.revealButtonItem;
 
-    self.pointerCalibrationOn = NO;
     self.movingPointer.layer.cornerRadius = 3;
 
     [self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer];
@@ -255,9 +239,6 @@
     [self.slideView setShadow];
     [self.secondarySlideView setShadow];
 
-    // We calibrate once when presentation starts. needs a users alert to inform users to point at the center of the screen at the beginning
-    self.pointerCalibrationOn = YES;
-
     [super viewDidAppear:animated];
 }
 
-- 
cgit