diff --git a/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate b/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate
index a7650de0a28e..78e830a65245 100644
Binary files a/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate and b/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/ios/iosremote/iosremote/Communication/CommunicationManager.m b/ios/iosremote/iosremote/Communication/CommunicationManager.m
index 1ac878dfb4a1..52a826616955 100644
--- a/ios/iosremote/iosremote/Communication/CommunicationManager.m
+++ b/ios/iosremote/iosremote/Communication/CommunicationManager.m
@@ -49,15 +49,14 @@
- (void) connectionStatusHandler:(NSNotification *)note
{
- if ([self.delegate respondsToSelector:@selector(disableSpinner)])
- [self.delegate disableSpinner];
if([[note name] isEqualToString:@"connection.status.connected"]){
if (self.state!=CONNECTED){
- NSLog(@"Connected");
+ NSLog(@"Connected, waiting for pairing response");
self.transmitter = [[CommandTransmitter alloc] initWithClient:self.client];
- self.state = CONNECTED;
}
} else if ([[note name] isEqualToString:@"connection.status.disconnected"]){
+ if ([self.delegate respondsToSelector:@selector(disableSpinner)])
+ [self.delegate disableSpinner];
if (self.state != DISCONNECTED) {
NSLog(@"Connection Failed");
self.state = DISCONNECTED;
@@ -118,8 +117,8 @@
if (self.state == CONNECTING) {
return;
} else {
- self.state = CONNECTING;
[self.client disconnect];
+ self.state = CONNECTING;
// initialise it with a given server
self.client = [[Client alloc]initWithServer:server managedBy:self interpretedBy:self.interpreter];
self.transmitter = [[CommandTransmitter alloc] initWithClient:self.client];
diff --git a/ios/iosremote/iosremote/en.lproj/iPhone_autolayout.storyboard b/ios/iosremote/iosremote/en.lproj/iPhone_autolayout.storyboard
index 5fbdb2392689..c900f65aeeec 100644
--- a/ios/iosremote/iosremote/en.lproj/iPhone_autolayout.storyboard
+++ b/ios/iosremote/iosremote/en.lproj/iPhone_autolayout.storyboard
@@ -460,31 +460,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
-
+
+
@@ -586,7 +574,6 @@
-
@@ -821,6 +808,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/iosremote/iosremote/serverList_vc.m b/ios/iosremote/iosremote/serverList_vc.m
index 9d15bc800612..8493ff5a3571 100644
--- a/ios/iosremote/iosremote/serverList_vc.m
+++ b/ios/iosremote/iosremote/serverList_vc.m
@@ -61,12 +61,16 @@
object:nil
queue:mainQueue
usingBlock:^(NSNotification *note) {
+ self.comManager.state = CONNECTED;
+ [self disableSpinner];
[self performSegueWithIdentifier:@"pinValidation" sender:self ];
}];
self.slideShowPreviewStartObserver = [[NSNotificationCenter defaultCenter] addObserverForName:STATUS_PAIRING_PAIRED
object:nil
queue:mainQueue
usingBlock:^(NSNotification *note) {
+ self.comManager.state = CONNECTED;
+ [self disableSpinner];
[self performSegueWithIdentifier:@"SlideShowPreview" sender:self ];
}];
[super viewDidAppear:animated];
diff --git a/ios/iosremote/iosremote/slideShow_vc.m b/ios/iosremote/iosremote/slideShow_vc.m
index 71d83d80c405..db979a3f27be 100644
--- a/ios/iosremote/iosremote/slideShow_vc.m
+++ b/ios/iosremote/iosremote/slideShow_vc.m
@@ -187,19 +187,34 @@
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
- CGPoint loc = [touch locationInView:self.slideView];
- if (loc.x >= 0 && loc.x <= self.slideView.frame.origin.x+self.slideView.frame.size.width
- && loc.y >= 0 && loc.y <= self.slideView.frame.origin.y + self.slideView.frame.size.height)
- NSLog(@"Touch begins at: %f, %f", loc.x, loc.y);
+ CGPoint loc = [touch locationInView:self.touchPointerImage];
+ if (loc.x >= 0 && loc.x <= self.touchPointerImage.frame.size.width
+ && loc.y >= 0 && loc.y <= self.touchPointerImage.frame.size.height){
+ CGPoint p;
+ p.x = loc.x + self.touchPointerImage.frame.origin.x;
+ p.y = loc.y + self.touchPointerImage.frame.origin.y;
+ self.movingPointer.center = p;
+ [self.movingPointer setHidden:NO];
+ }
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [[event allTouches] anyObject];
- CGPoint loc = [touch locationInView:self.slideView];
- if (loc.x >= 0 && loc.x <= self.slideView.frame.origin.x+self.slideView.frame.size.width
- && loc.y >= 0 && loc.y <= self.slideView.frame.origin.y + self.slideView.frame.size.height)
- NSLog(@"Touch at: %f, %f", loc.x, loc.y);
+ CGPoint loc = [touch locationInView:self.touchPointerImage];
+ if (loc.x >= 0 && loc.x <= self.touchPointerImage.frame.size.width
+ && loc.y >= self.movingPointer.frame.size.height && loc.y <= self.touchPointerImage.frame.size.height - self.movingPointer.frame.size.height)
+ {
+ CGPoint p;
+ p.x = loc.x + self.touchPointerImage.frame.origin.x;
+ p.y = loc.y + self.touchPointerImage.frame.origin.y;
+ self.movingPointer.center = p;
+ }
+}
+
+- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
+{
+ [self.movingPointer setHidden:YES];
}
#pragma mark - System defaults
@@ -253,8 +268,12 @@
BOOL acc = [[NSUserDefaults standardUserDefaults] boolForKey:KEY_POINTER];
if (!acc) {
+ // Hook up acc detection
[self.pointerBtn addTarget:self action:@selector(pointerAction:) forControlEvents:UIControlEventTouchUpOutside];
[self.pointerBtn addTarget:self action:@selector(pointerAction:) forControlEvents:UIControlEventTouchUpInside];
+ } else {
+ // Disable all calibration functions for acc based pointer
+ self.count = INT_MAX;
}
}