summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsiqi <me@siqi.fr>2013-07-05 21:33:24 +0200
committersiqi <me@siqi.fr>2013-07-06 12:45:23 +0200
commit19168e3f7a337b85e9a5835fb8f3ffc81d927bba (patch)
tree14a3bac50d650a31047f8c4c4f47aa7d90c2ac6c
parentc154551d638cc016b5c3d615a32450dc38902098 (diff)
slideshow control pad
Change-Id: Ie82e10fcdfc495ac19a34be85249480540e88d1d
-rw-r--r--ios/iosremote/.DS_Storebin0 -> 6148 bytes
-rw-r--r--ios/iosremote/iosremote.xcodeproj/project.pbxproj30
-rw-r--r--ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstatebin0 -> 24288 bytes
-rw-r--r--ios/iosremote/iosremote/Communication/CommandInterpreter.m12
-rw-r--r--ios/iosremote/iosremote/Communication/CommunicationManager.h11
-rw-r--r--ios/iosremote/iosremote/Communication/CommunicationManager.m7
-rw-r--r--ios/iosremote/iosremote/Communication/pinValidation_vc.m22
-rw-r--r--ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard195
-rw-r--r--ios/iosremote/iosremote/impress.jpegbin0 -> 7476 bytes
-rw-r--r--ios/iosremote/iosremote/iosremote-Prefix.pch14
-rw-r--r--ios/iosremote/iosremote/pushed_next_button.pngbin0 -> 9302 bytes
-rw-r--r--ios/iosremote/iosremote/pushed_previous_button.pngbin0 -> 11006 bytes
-rw-r--r--ios/iosremote/iosremote/released_next_button.pngbin0 -> 9076 bytes
-rw-r--r--ios/iosremote/iosremote/released_previous_button.pngbin0 -> 11473 bytes
-rw-r--r--ios/iosremote/iosremote/serverList_vc.m12
-rw-r--r--ios/iosremote/iosremote/slideShowPreviewTable_vc.h4
-rw-r--r--ios/iosremote/iosremote/slideShowPreviewTable_vc.m75
-rw-r--r--ios/iosremote/iosremote/slideShow_vc.h16
-rw-r--r--ios/iosremote/iosremote/slideShow_vc.m55
19 files changed, 325 insertions, 128 deletions
diff --git a/ios/iosremote/.DS_Store b/ios/iosremote/.DS_Store
new file mode 100644
index 000000000000..9940e912eb0c
--- /dev/null
+++ b/ios/iosremote/.DS_Store
Binary files differ
diff --git a/ios/iosremote/iosremote.xcodeproj/project.pbxproj b/ios/iosremote/iosremote.xcodeproj/project.pbxproj
index 646c33060358..3f41f43cf017 100644
--- a/ios/iosremote/iosremote.xcodeproj/project.pbxproj
+++ b/ios/iosremote/iosremote.xcodeproj/project.pbxproj
@@ -9,6 +9,12 @@
/* Begin PBXBuildFile section */
5753DD901781EA0300DB71BB /* serverList_vc.m in Sources */ = {isa = PBXBuildFile; fileRef = 5753DD8F1781EA0300DB71BB /* serverList_vc.m */; };
5753DD9917834D7100DB71BB /* newServer_vc.m in Sources */ = {isa = PBXBuildFile; fileRef = 5753DD9817834D7100DB71BB /* newServer_vc.m */; };
+ 57867A541787172A00EBBE52 /* impress.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 57867A531787172A00EBBE52 /* impress.jpeg */; };
+ 57867A571787385800EBBE52 /* slideShow_vc.m in Sources */ = {isa = PBXBuildFile; fileRef = 57867A561787385800EBBE52 /* slideShow_vc.m */; };
+ 57867A5A1787510700EBBE52 /* pushed_next_button.png in Resources */ = {isa = PBXBuildFile; fileRef = 57867A581787510700EBBE52 /* pushed_next_button.png */; };
+ 57867A5B1787510700EBBE52 /* released_next_button.png in Resources */ = {isa = PBXBuildFile; fileRef = 57867A591787510700EBBE52 /* released_next_button.png */; };
+ 57867A5E178752CD00EBBE52 /* pushed_previous_button.png in Resources */ = {isa = PBXBuildFile; fileRef = 57867A5C178752CD00EBBE52 /* pushed_previous_button.png */; };
+ 57867A5F178752CD00EBBE52 /* released_previous_button.png in Resources */ = {isa = PBXBuildFile; fileRef = 57867A5D178752CD00EBBE52 /* released_previous_button.png */; };
57B152991764703500EECC67 /* Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 57B152981764703500EECC67 /* Base64.m */; };
57B1529F176486C300EECC67 /* CommandTransmitter.m in Sources */ = {isa = PBXBuildFile; fileRef = 57B1529E176486C300EECC67 /* CommandTransmitter.m */; };
57B7625D17621E42007703F6 /* SlideShow.m in Sources */ = {isa = PBXBuildFile; fileRef = 57B7625C17621E42007703F6 /* SlideShow.m */; };
@@ -38,6 +44,13 @@
5753DD8F1781EA0300DB71BB /* serverList_vc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = serverList_vc.m; sourceTree = "<group>"; };
5753DD9717834D7100DB71BB /* newServer_vc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = newServer_vc.h; sourceTree = "<group>"; };
5753DD9817834D7100DB71BB /* newServer_vc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = newServer_vc.m; sourceTree = "<group>"; };
+ 57867A531787172A00EBBE52 /* impress.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = impress.jpeg; sourceTree = "<group>"; };
+ 57867A551787385800EBBE52 /* slideShow_vc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = slideShow_vc.h; sourceTree = "<group>"; };
+ 57867A561787385800EBBE52 /* slideShow_vc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = slideShow_vc.m; sourceTree = "<group>"; };
+ 57867A581787510700EBBE52 /* pushed_next_button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pushed_next_button.png; sourceTree = "<group>"; };
+ 57867A591787510700EBBE52 /* released_next_button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = released_next_button.png; sourceTree = "<group>"; };
+ 57867A5C178752CD00EBBE52 /* pushed_previous_button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pushed_previous_button.png; sourceTree = "<group>"; };
+ 57867A5D178752CD00EBBE52 /* released_previous_button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = released_previous_button.png; sourceTree = "<group>"; };
57B152971764703500EECC67 /* Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Base64.h; path = iosremote/Base64.h; sourceTree = "<group>"; };
57B152981764703500EECC67 /* Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Base64.m; path = iosremote/Base64.m; sourceTree = "<group>"; };
57B1529D176486C300EECC67 /* CommandTransmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommandTransmitter.h; sourceTree = "<group>"; };
@@ -126,18 +139,20 @@
57C6E3F8175E06E800E8BC5F /* iosremote */ = {
isa = PBXGroup;
children = (
+ 57C6E3F9175E06E800E8BC5F /* Supporting Files */,
+ 57C6E40A175E06E800E8BC5F /* MainStoryboard_iPhone.storyboard */,
57FE71E11785C61300B50125 /* pinValidation_vc.h */,
57FE71E21785C61400B50125 /* pinValidation_vc.m */,
57FE71E41785D7FE00B50125 /* slideShowPreview_vc.h */,
57FE71E51785D7FE00B50125 /* slideShowPreview_vc.m */,
57C6E401175E06E800E8BC5F /* libreoffice_sdremoteAppDelegate.h */,
57C6E402175E06E800E8BC5F /* libreoffice_sdremoteAppDelegate.m */,
- 57C6E40A175E06E800E8BC5F /* MainStoryboard_iPhone.storyboard */,
+ 57867A551787385800EBBE52 /* slideShow_vc.h */,
+ 57867A561787385800EBBE52 /* slideShow_vc.m */,
5753DD9717834D7100DB71BB /* newServer_vc.h */,
5753DD9817834D7100DB71BB /* newServer_vc.m */,
5753DD8E1781EA0300DB71BB /* serverList_vc.h */,
5753DD8F1781EA0300DB71BB /* serverList_vc.m */,
- 57C6E3F9175E06E800E8BC5F /* Supporting Files */,
57CFED9717838FDC00E82E05 /* EditableTableViewCell.h */,
57CFED9817838FDC00E82E05 /* EditableTableViewCell.m */,
57FE71E717861A9000B50125 /* slideShowPreviewTable_vc.h */,
@@ -149,6 +164,11 @@
57C6E3F9175E06E800E8BC5F /* Supporting Files */ = {
isa = PBXGroup;
children = (
+ 57867A581787510700EBBE52 /* pushed_next_button.png */,
+ 57867A591787510700EBBE52 /* released_next_button.png */,
+ 57867A5C178752CD00EBBE52 /* pushed_previous_button.png */,
+ 57867A5D178752CD00EBBE52 /* released_previous_button.png */,
+ 57867A531787172A00EBBE52 /* impress.jpeg */,
57C6E3FA175E06E800E8BC5F /* iosremote-Info.plist */,
57C6E3FB175E06E800E8BC5F /* InfoPlist.strings */,
57C6E3FE175E06E800E8BC5F /* main.m */,
@@ -237,6 +257,11 @@
57C6E407175E06E800E8BC5F /* Default@2x.png in Resources */,
57C6E409175E06E800E8BC5F /* Default-568h@2x.png in Resources */,
57C6E40C175E06E800E8BC5F /* MainStoryboard_iPhone.storyboard in Resources */,
+ 57867A541787172A00EBBE52 /* impress.jpeg in Resources */,
+ 57867A5A1787510700EBBE52 /* pushed_next_button.png in Resources */,
+ 57867A5B1787510700EBBE52 /* released_next_button.png in Resources */,
+ 57867A5E178752CD00EBBE52 /* pushed_previous_button.png in Resources */,
+ 57867A5F178752CD00EBBE52 /* released_previous_button.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -262,6 +287,7 @@
57FE71E31785C61400B50125 /* pinValidation_vc.m in Sources */,
57FE71E61785D7FE00B50125 /* slideShowPreview_vc.m in Sources */,
57FE71E917861A9000B50125 /* slideShowPreviewTable_vc.m in Sources */,
+ 57867A571787385800EBBE52 /* slideShow_vc.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
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
new file mode 100644
index 000000000000..3c57b1fc40b0
--- /dev/null
+++ b/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate
Binary files differ
diff --git a/ios/iosremote/iosremote/Communication/CommandInterpreter.m b/ios/iosremote/iosremote/Communication/CommandInterpreter.m
index 3bce86c7ff11..f66e624b1677 100644
--- a/ios/iosremote/iosremote/Communication/CommandInterpreter.m
+++ b/ios/iosremote/iosremote/Communication/CommandInterpreter.m
@@ -37,8 +37,15 @@
}
NSLog(@"Command:%@", command);
NSString *instruction = [command objectAtIndex:0];
-
- if([instruction isEqualToString:@"slideshow_started"]){
+ if ([instruction isEqualToString:STATUS_PAIRING_PINVALIDATION]) {
+ [[NSNotificationCenter defaultCenter] postNotificationName:STATUS_PAIRING_PINVALIDATION
+ object:nil];
+ }
+ else if ([instruction isEqualToString:STATUS_PAIRING_PAIRED]){
+ [[NSNotificationCenter defaultCenter] postNotificationName:STATUS_PAIRING_PAIRED
+ object:nil];
+ }
+ else if([instruction isEqualToString:@"slideshow_started"]){
NSLog(@"Interpreter: slideshow_started");
uint slideLength = [[command objectAtIndex:1] integerValue];
uint currentSlide = [[command objectAtIndex:2] integerValue];
@@ -83,7 +90,6 @@
AtIndex:slideNumber];
[[NSNotificationCenter defaultCenter] postNotificationName:MSG_SLIDE_NOTES object: [NSNumber numberWithUnsignedInt:slideNumber]];
}
-
}
}
diff --git a/ios/iosremote/iosremote/Communication/CommunicationManager.h b/ios/iosremote/iosremote/Communication/CommunicationManager.h
index 908ed6b56042..2c57dc02b1c6 100644
--- a/ios/iosremote/iosremote/Communication/CommunicationManager.h
+++ b/ios/iosremote/iosremote/Communication/CommunicationManager.h
@@ -37,7 +37,16 @@
*/
#define STATUS_CONNECTED_NOSLIDESHOW @"STATUS_CONNECTED_NOSLIDESHOW"
-#define STATUS_PAIRING_PINVALIDATION @"STATUS_PAIRING_PINVALIDATION"
+/**
+ * Asking for a pairing interface
+ */
+#define STATUS_PAIRING_PINVALIDATION @"LO_SERVER_VALIDATING_PIN"
+
+
+/*
+ * Paired, should bring users to the preview page
+ */
+#define STATUS_PAIRING_PAIRED @"LO_SERVER_SERVER_PAIRED"
#define STATUS_CONNECTION_FAILED @"STATUS_CONNECTION_FAILED"
diff --git a/ios/iosremote/iosremote/Communication/CommunicationManager.m b/ios/iosremote/iosremote/Communication/CommunicationManager.m
index 7c6a486ceee5..36753879d330 100644
--- a/ios/iosremote/iosremote/Communication/CommunicationManager.m
+++ b/ios/iosremote/iosremote/Communication/CommunicationManager.m
@@ -21,8 +21,6 @@
@interface CommunicationManager()
@property (nonatomic, strong) Client* client;
-@property (nonatomic, strong) id connectionConnectedObserver;
-@property (nonatomic, strong) id connectionDisconnectedObserver;
@end
@@ -35,8 +33,6 @@
@synthesize transmitter = _transmitter;
@synthesize servers = _servers;
@synthesize delegate = _delegate;
-@synthesize connectionConnectedObserver = _connectionConnectedObserver;
-@synthesize connectionDisconnectedObserver = _connectionDisconnectedObserver;
+ (CommunicationManager *)sharedComManager
{
@@ -59,9 +55,6 @@
NSLog(@"Connected");
self.transmitter = [[CommandTransmitter alloc] initWithClient:self.client];
self.state = CONNECTED;
- [self.delegate performSegueWithIdentifier:@"pinValidation" sender:nil];
- } else {
- NSLog(@"Already connected");
}
} else if ([[note name] isEqualToString:@"connection.status.disconnected"]){
if (self.state != DISCONNECTED) {
diff --git a/ios/iosremote/iosremote/Communication/pinValidation_vc.m b/ios/iosremote/iosremote/Communication/pinValidation_vc.m
index 14dadee7503c..6c81043c14df 100644
--- a/ios/iosremote/iosremote/Communication/pinValidation_vc.m
+++ b/ios/iosremote/iosremote/Communication/pinValidation_vc.m
@@ -40,21 +40,21 @@
self.comManager = [CommunicationManager sharedComManager];
[self.pinLabel setText:[NSString stringWithFormat:@"%@", [self.comManager getPairingPin]]];
NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
- self.slideShowPreviewStartObserver = [[NSNotificationCenter defaultCenter] addObserverForName:STATUS_CONNECTED_SLIDESHOW_RUNNING
+ self.slideShowPreviewStartObserver = [[NSNotificationCenter defaultCenter] addObserverForName:STATUS_PAIRING_PAIRED
object:nil
queue:mainQueue
usingBlock:^(NSNotification *note) {
- [self performSegueWithIdentifier:@"pinValidated" sender:self ];
- }];
-}
-
-- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
- if ([segue.identifier isEqualToString:@"pinValidated"]) {
- slideShowPreview_vc *destViewController = segue.destinationViewController;
- destViewController.slideshow = [self.comManager.interpreter slideShow];
- [destViewController.slideshow setDelegate:destViewController];
- }
+ [self performSegueWithIdentifier:@"pinValidated" sender:self ];
+ }];
}
+//
+//- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
+// if ([segue.identifier isEqualToString:@"pinValidated"]) {
+// slideShowPreview_vc *destViewController = segue.destinationViewController;
+// destViewController.slideshow = [self.comManager.interpreter slideShow];
+// [destViewController.slideshow setDelegate:destViewController];
+// }
+//}
- (void)didReceiveMemoryWarning
{
diff --git a/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard b/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard
index 29c4a32a6470..ab8a55f4d5a5 100644
--- a/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard
+++ b/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard
@@ -56,7 +56,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4" sceneMemberID="firstResponder"/>
</objects>
- <point key="canvasLocation" x="528" y="118"/>
+ <point key="canvasLocation" x="80" y="-294"/>
</scene>
<!--Pin Validation vc-->
<scene sceneID="aCW-l9-UDx">
@@ -73,8 +73,8 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Please enter the pin code above in Impress - Slide Show - Impress Remote" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="upW-oF-qOa">
- <rect key="frame" x="29" y="208" width="271" height="53"/>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Please enter the pin code above in Impress - Slide Show - Impress Remote" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="upW-oF-qOa">
+ <rect key="frame" x="29" y="208" width="271" height="65"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="Helvetica-Light" family="Helvetica" pointSize="15"/>
<color key="textColor" name="alternateSelectedControlColor" catalog="System" colorSpace="catalog"/>
@@ -99,7 +99,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iok-RC-uS6" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
- <point key="canvasLocation" x="528" y="872"/>
+ <point key="canvasLocation" x="80" y="460"/>
</scene>
<!--New Server View Controller - New Server-->
<scene sceneID="tlJ-c5-Jp2">
@@ -148,7 +148,7 @@
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="b5I-aN-vyr" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
- <point key="canvasLocation" x="1052" y="-63"/>
+ <point key="canvasLocation" x="604" y="-475"/>
</scene>
<!--View Controller-->
<scene sceneID="ccD-EG-LMW">
@@ -178,10 +178,75 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" id="rqp-6S-yX6"/>
+ <connections>
+ <segue destination="Ivv-3X-Nhr" kind="push" identifier="slideShowSegue" id="mqm-h4-xUD"/>
+ </connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="APz-RZ-QFt" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
- <point key="canvasLocation" x="1052" y="695"/>
+ <point key="canvasLocation" x="620" y="372"/>
+ </scene>
+ <!--Slide Show vc-->
+ <scene sceneID="eap-cb-uAt">
+ <objects>
+ <viewController id="Ivv-3X-Nhr" customClass="slideShow_vc" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="Xty-aF-WDv">
+ <rect key="frame" x="0.0" y="64" width="320" height="504"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <imageView userInteractionEnabled="NO" contentMode="scaleToFill" id="bZq-z2-OKU">
+ <rect key="frame" x="0.0" y="20" width="320" height="177"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ </imageView>
+ <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="811-qk-UdS">
+ <rect key="frame" x="20" y="317" width="280" height="167"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ <string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string>
+ <fontDescription key="fontDescription" type="system" pointSize="14"/>
+ <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+ </textView>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="XDZ-bs-OUM">
+ <rect key="frame" x="227" y="221" width="61" height="61"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+ <state key="normal" backgroundImage="released_next_button.png">
+ <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <state key="highlighted" backgroundImage="pushed_next_button.png">
+ <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <connections>
+ <action selector="nextSlideAction:" destination="Ivv-3X-Nhr" eventType="touchUpInside" id="qTl-Ib-3Z8"/>
+ </connections>
+ </button>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="vh9-Zy-DPu">
+ <rect key="frame" x="25" y="221" width="61" height="61"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+ <state key="normal" backgroundImage="released_previous_button.png">
+ <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <state key="highlighted" backgroundImage="pushed_previous_button.png">
+ <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <connections>
+ <action selector="previousSlideAction:" destination="Ivv-3X-Nhr" eventType="touchUpInside" id="DAf-Qp-7KW"/>
+ </connections>
+ </button>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
+ <navigationItem key="navigationItem" id="T79-lT-61m"/>
+ <connections>
+ <outlet property="nextBtn" destination="XDZ-bs-OUM" id="tcL-xX-S8l"/>
+ </connections>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="Uei-nM-J1S" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="620" y="1208"/>
</scene>
<!--Slide Show Preview Table vc-->
<scene sceneID="Tvi-bD-vMC">
@@ -190,73 +255,34 @@
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="singleLineEtched" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="rWA-v3-wtf">
<rect key="frame" x="0.0" y="0.0" width="320" height="308"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
- <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
+ <color key="backgroundColor" cocoaTouchSystemColor="scrollViewTexturedBackgroundColor"/>
<sections>
<tableViewSection id="8wQ-rK-ve4">
<cells>
- <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="0D7-tO-bVg">
+ <tableViewCell contentMode="scaleToFill" restorationIdentifier="" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="optionCell" id="0D7-tO-bVg">
<rect key="frame" x="0.0" y="10" width="320" height="45"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="1" width="300" height="43"/>
<autoresizingMask key="autoresizingMask"/>
- <subviews>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Lecturer's notes" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="cqt-7d-BbV">
- <rect key="frame" x="20" y="11" width="121" height="21"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- </label>
- <switch opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" id="Vmo-Lk-YLZ">
- <rect key="frame" x="203" y="8" width="79" height="27"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- </switch>
- </subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</tableViewCell>
- <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="LrN-2p-yDw">
+ <tableViewCell contentMode="scaleToFill" restorationIdentifier="" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="optionCell" id="LrN-2p-yDw">
<rect key="frame" x="0.0" y="55" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="0.0" width="300" height="43"/>
<autoresizingMask key="autoresizingMask"/>
- <subviews>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Timer" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="c2r-cZ-hoW">
- <rect key="frame" x="20" y="11" width="44" height="21"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- </label>
- <switch opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" id="hp6-Kp-ujK">
- <rect key="frame" x="203" y="8" width="79" height="27"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- </switch>
- </subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</tableViewCell>
- <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="Cdv-T8-mH7">
+ <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="optionCell" id="Cdv-T8-mH7">
<rect key="frame" x="0.0" y="99" width="320" height="45"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="0.0" width="300" height="43"/>
<autoresizingMask key="autoresizingMask"/>
- <subviews>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Pointer" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="5wf-j3-OjO">
- <rect key="frame" x="20" y="11" width="54" height="21"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- </label>
- <switch opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" id="yPM-as-1Zw">
- <rect key="frame" x="203" y="8" width="79" height="27"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- </switch>
- </subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</tableViewCell>
@@ -264,17 +290,17 @@
</tableViewSection>
</sections>
<connections>
- <outlet property="dataSource" destination="Ybo-9c-MB8" id="GrB-3r-c8s"/>
- <outlet property="delegate" destination="Ybo-9c-MB8" id="QI6-vt-nrW"/>
+ <outlet property="dataSource" destination="Ybo-9c-MB8" id="nDU-cr-5RV"/>
+ <outlet property="delegate" destination="Ybo-9c-MB8" id="6Gf-g5-zXK"/>
</connections>
</tableView>
<connections>
- <outlet property="optionTableView" destination="rWA-v3-wtf" id="kpL-OO-92A"/>
+ <outlet property="optionsTable" destination="rWA-v3-wtf" id="qXR-p3-aap"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="z5S-eI-1pb" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
- <point key="canvasLocation" x="1581" y="1002"/>
+ <point key="canvasLocation" x="1133" y="590"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="yRe-s4-oKK">
@@ -292,32 +318,66 @@
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="f9j-Cw-dxh" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
- <point key="canvasLocation" x="68" y="75"/>
+ <point key="canvasLocation" x="-380" y="-337"/>
</scene>
<!--View Controller-->
<scene sceneID="kRQ-fB-NKx">
<objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="uCa-zh-PLh" userLabel="First Responder" sceneMemberID="firstResponder"/>
<viewController id="HMh-Ba-7X9" sceneMemberID="viewController">
<view key="view" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="Swz-wK-30Z">
<rect key="frame" x="0.0" y="0.0" width="320" height="197"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
- <imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="Default@2x.png" id="qyi-U8-2KF">
- <rect key="frame" x="0.0" y="0.0" width="320" height="197"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- </imageView>
+ <view contentMode="scaleToFill" id="2Zo-K8-3NM">
+ <rect key="frame" x="13" y="14" width="295" height="169"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Title of the presentation" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="5" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="nJf-ed-YfY">
+ <rect key="frame" x="58" y="20" width="178" height="56"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="25"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Author: author name" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="g5m-gQ-o0u">
+ <rect key="frame" x="32" y="91" width="160" height="12"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="14"/>
+ <color key="textColor" name="alternateSelectedControlColor" catalog="System" colorSpace="catalog"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Last modified: 3 Jul 2013" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Dds-oJ-Uhh">
+ <rect key="frame" x="32" y="111" width="194" height="14"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="14"/>
+ <color key="textColor" name="alternateSelectedControlColor" catalog="System" colorSpace="catalog"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Current slide: 5 of 22" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="mrB-Wd-OcP">
+ <rect key="frame" x="32" y="133" width="169" height="16"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="14"/>
+ <color key="textColor" name="alternateSelectedControlColor" catalog="System" colorSpace="catalog"/>
+ <nil key="highlightedColor"/>
+ </label>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
</subviews>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <color key="backgroundColor" cocoaTouchSystemColor="scrollViewTexturedBackgroundColor"/>
</view>
<toolbarItems/>
</viewController>
- <placeholder placeholderIdentifier="IBFirstResponder" id="uCa-zh-PLh" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
- <point key="canvasLocation" x="1581" y="684"/>
+ <point key="canvasLocation" x="1133" y="272"/>
</scene>
</scenes>
<resources>
- <image name="Default@2x.png" width="640" height="960"/>
+ <image name="pushed_next_button.png" width="113" height="113"/>
+ <image name="pushed_previous_button.png" width="113" height="113"/>
+ <image name="released_next_button.png" width="113" height="113"/>
+ <image name="released_previous_button.png" width="113" height="113"/>
</resources>
<classes>
<class className="EditableTableViewCell" superclassName="UITableViewCell">
@@ -344,6 +404,17 @@
</class>
<class className="slideShowPreviewTable_vc" superclassName="UITableViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/slideShowPreviewTable_vc.h"/>
+ <relationships>
+ <relationship kind="action" name="startPresentationAction:"/>
+ <relationship kind="outlet" name="optionsTable" candidateClass="UITableView"/>
+ </relationships>
+ </class>
+ <class className="slideShow_vc" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/slideShow_vc.h"/>
+ <relationships>
+ <relationship kind="action" name="nextSlideAction:"/>
+ <relationship kind="action" name="previousSlideAction:"/>
+ </relationships>
</class>
</classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
diff --git a/ios/iosremote/iosremote/impress.jpeg b/ios/iosremote/iosremote/impress.jpeg
new file mode 100644
index 000000000000..89923c66db27
--- /dev/null
+++ b/ios/iosremote/iosremote/impress.jpeg
Binary files differ
diff --git a/ios/iosremote/iosremote/iosremote-Prefix.pch b/ios/iosremote/iosremote/iosremote-Prefix.pch
new file mode 100644
index 000000000000..b60bc65760ce
--- /dev/null
+++ b/ios/iosremote/iosremote/iosremote-Prefix.pch
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'iosremote' target in the 'iosremote' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_5_0
+#warning "This project uses features only available in iOS SDK 5.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
diff --git a/ios/iosremote/iosremote/pushed_next_button.png b/ios/iosremote/iosremote/pushed_next_button.png
new file mode 100644
index 000000000000..63ad8207cf0a
--- /dev/null
+++ b/ios/iosremote/iosremote/pushed_next_button.png
Binary files differ
diff --git a/ios/iosremote/iosremote/pushed_previous_button.png b/ios/iosremote/iosremote/pushed_previous_button.png
new file mode 100644
index 000000000000..a6f90ca11e0a
--- /dev/null
+++ b/ios/iosremote/iosremote/pushed_previous_button.png
Binary files differ
diff --git a/ios/iosremote/iosremote/released_next_button.png b/ios/iosremote/iosremote/released_next_button.png
new file mode 100644
index 000000000000..aa8b899bfa19
--- /dev/null
+++ b/ios/iosremote/iosremote/released_next_button.png
Binary files differ
diff --git a/ios/iosremote/iosremote/released_previous_button.png b/ios/iosremote/iosremote/released_previous_button.png
new file mode 100644
index 000000000000..71e2618f8228
--- /dev/null
+++ b/ios/iosremote/iosremote/released_previous_button.png
Binary files differ
diff --git a/ios/iosremote/iosremote/serverList_vc.m b/ios/iosremote/iosremote/serverList_vc.m
index b613566a33f3..141cadd7ed32 100644
--- a/ios/iosremote/iosremote/serverList_vc.m
+++ b/ios/iosremote/iosremote/serverList_vc.m
@@ -16,6 +16,7 @@
@property (nonatomic, strong) CommunicationManager *comManager;
@property (nonatomic, weak) NSNotificationCenter* center;
@property (nonatomic, strong) id slideShowPreviewStartObserver;
+@property (nonatomic, strong) id pinValidationObserver;
@property (nonatomic, strong) NSIndexPath *lastSpinningCellIndex;
@end
@@ -26,6 +27,7 @@
@synthesize comManager = _comManager;
@synthesize lastSpinningCellIndex = _lastSpinningCellIndex;
@synthesize slideShowPreviewStartObserver = _slideShowPreviewStartObserver;
+@synthesize pinValidationObserver = _pinValidationObserver;
- (id)initWithStyle:(UITableViewStyle)style
{
@@ -52,12 +54,18 @@
self.serverTable.delegate = self;
NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
- self.slideShowPreviewStartObserver = [[NSNotificationCenter defaultCenter] addObserverForName:STATUS_CONNECTED_SLIDESHOW_RUNNING
+ self.pinValidationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:STATUS_PAIRING_PINVALIDATION
object:nil
queue:mainQueue
usingBlock:^(NSNotification *note) {
- [self performSegueWithIdentifier:@"SlideShowPreview" sender:self ];
+ [self performSegueWithIdentifier:@"pinValidation" sender:self ];
}];
+ self.slideShowPreviewStartObserver = [[NSNotificationCenter defaultCenter] addObserverForName:STATUS_PAIRING_PAIRED
+ object:nil
+ queue:mainQueue
+ usingBlock:^(NSNotification *note) {
+ [self performSegueWithIdentifier:@"SlideShowPreview" sender:self ];
+ }];
}
-(void)viewWillAppear:(BOOL)animated
diff --git a/ios/iosremote/iosremote/slideShowPreviewTable_vc.h b/ios/iosremote/iosremote/slideShowPreviewTable_vc.h
index b2daa4dd1824..0b07cc467876 100644
--- a/ios/iosremote/iosremote/slideShowPreviewTable_vc.h
+++ b/ios/iosremote/iosremote/slideShowPreviewTable_vc.h
@@ -8,6 +8,8 @@
#import <UIKit/UIKit.h>
-@interface slideShowPreviewTable_vc : UITableViewController
+@interface slideShowPreviewTable_vc : UITableViewController <UITableViewDataSource, UITableViewDelegate>
+
+@property (strong, nonatomic) IBOutlet UITableView *optionsTable;
@end
diff --git a/ios/iosremote/iosremote/slideShowPreviewTable_vc.m b/ios/iosremote/iosremote/slideShowPreviewTable_vc.m
index c10166a0e345..0e3a5f619a26 100644
--- a/ios/iosremote/iosremote/slideShowPreviewTable_vc.m
+++ b/ios/iosremote/iosremote/slideShowPreviewTable_vc.m
@@ -7,16 +7,21 @@
//
#import "slideShowPreviewTable_vc.h"
+#import "CommunicationManager.h"
+#import "CommandTransmitter.h"
@interface slideShowPreviewTable_vc ()
-@property (nonatomic, strong) UIButton * startButton;
-
+@property (nonatomic, weak) UIButton * startButton;
+@property (nonatomic, strong) NSArray * optionsArray;
+@property (nonatomic, strong) CommunicationManager * comManager;
@end
@implementation slideShowPreviewTable_vc
@synthesize startButton = _startButton;
+@synthesize optionsTable = _optionsTable;
+@synthesize optionsArray = _optionsArray;
- (id)initWithStyle:(UITableViewStyle)style
{
@@ -36,6 +41,9 @@
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
+ self.optionsArray = [NSArray arrayWithObjects:@"Lecturer's Notes", @"Timer", @"Pointer", nil];
+ self.comManager = [CommunicationManager sharedComManager];
+ self.comManager.delegate = self;
}
- (void)didReceiveMemoryWarning
@@ -46,26 +54,25 @@
#pragma mark - Table view data source
-- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
-{
-#warning Potentially incomplete method implementation.
- // Return the number of sections.
- return 0;
-}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
-#warning Incomplete method implementation.
- // Return the number of rows in the section.
- return 0;
+ return [self.optionsArray count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
- static NSString *CellIdentifier = @"Cell";
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
+ static NSString *CellIdentifier = @"optionCell";
+ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- // Configure the cell...
+ if (cell == nil) {
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
+ UISwitch *toggleSwitch = [[UISwitch alloc] init];
+ cell.accessoryView = [[UIView alloc] initWithFrame:toggleSwitch.frame];
+ [toggleSwitch setOn:YES];
+ [cell.accessoryView addSubview:toggleSwitch];
+ }
+ cell.textLabel.text = [self.optionsArray objectAtIndex:indexPath.row];
return cell;
}
@@ -110,28 +117,21 @@
*/
-(IBAction)startPresentationAction:(id)sender {
-
- UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Reset"
- message:@"You just pressed the Reset button"
- delegate:self
- cancelButtonTitle:@"Acknowledged"
- otherButtonTitles:nil];
- [alert show];
+ [[self.comManager transmitter] startPresentation];
+ [self performSegueWithIdentifier:@"slideShowSegue" sender:self];
}
- (UIButton *)startButton{
- if (self.startButton == nil)
- {
-
- self.startButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
- self.startButton.frame = CGRectMake(20.0, 40 , 95.0, 37.0);
- [self.startButton setTitle:@"Start Presentation" forState:UIControlStateNormal];
- self.startButton.backgroundColor = [UIColor clearColor];
- [self.startButton addTarget:self action:@selector(startPresentationAction:) forControlEvents:UIControlEventTouchDown];
+ if (_startButton == nil) {
+ _startButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
+ _startButton.frame = CGRectMake(10.0, 10.0, 300.0, 50.0);
+ [_startButton setTitle:@"Start Presentation" forState:UIControlStateNormal];
+ _startButton.backgroundColor = [UIColor clearColor];
+ [_startButton addTarget:self action:@selector(startPresentationAction:) forControlEvents:UIControlEventTouchDown];
- self.startButton.tag = 1;
+ _startButton.tag = 1;
}
- return self.startButton;
+ return _startButton;
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
@@ -146,23 +146,20 @@
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
- return 100.0;
+ return 50.0;
}
#pragma mark - Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
- // Navigation logic may go here. Create and push another view controller.
- /*
- <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil];
- // ...
- // Pass the selected object to the new view controller.
- [self.navigationController pushViewController:detailViewController animated:YES];
- */
+ UITableViewCell * cell = [tableView cellForRowAtIndexPath:indexPath];
+ UISwitch * toggle = [[[cell accessoryView] subviews] objectAtIndex:0];
+ [toggle setOn:![toggle isOn] animated:YES];
}
- (void)viewDidUnload {
+ [self setOptionsTable:nil];
[super viewDidUnload];
}
@end
diff --git a/ios/iosremote/iosremote/slideShow_vc.h b/ios/iosremote/iosremote/slideShow_vc.h
new file mode 100644
index 000000000000..654b1dbac47e
--- /dev/null
+++ b/ios/iosremote/iosremote/slideShow_vc.h
@@ -0,0 +1,16 @@
+//
+// slideShow_vc.h
+// iosremote
+//
+// Created by Liu Siqi on 7/5/13.
+// Copyright (c) 2013 libreoffice. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface slideShow_vc : UIViewController
+
+- (IBAction)nextSlideAction:(id)sender;
+- (IBAction)previousSlideAction:(id)sender;
+
+@end
diff --git a/ios/iosremote/iosremote/slideShow_vc.m b/ios/iosremote/iosremote/slideShow_vc.m
new file mode 100644
index 000000000000..9570704266b4
--- /dev/null
+++ b/ios/iosremote/iosremote/slideShow_vc.m
@@ -0,0 +1,55 @@
+//
+// slideShow_vc.m
+// iosremote
+//
+// Created by Liu Siqi on 7/5/13.
+// Copyright (c) 2013 libreoffice. All rights reserved.
+//
+
+#import "slideShow_vc.h"
+#import "CommunicationManager.h"
+#import "CommandTransmitter.h"
+
+@interface slideShow_vc ()
+
+@property (nonatomic, strong) CommunicationManager *comManager;
+
+@end
+
+@implementation slideShow_vc
+
+@synthesize comManager = _comManager;
+
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
+{
+ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
+ if (self) {
+ // Custom initialization
+ }
+ return self;
+}
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ self.comManager = [CommunicationManager sharedComManager];
+}
+
+- (void)didReceiveMemoryWarning
+{
+ [super didReceiveMemoryWarning];
+ // Dispose of any resources that can be recreated.
+}
+
+- (void)viewDidUnload {
+ [super viewDidUnload];
+}
+
+- (IBAction)nextSlideAction:(id)sender {
+ [[self.comManager transmitter] nextTransition];
+}
+
+- (IBAction)previousSlideAction:(id)sender {
+ [[self.comManager transmitter] previousTransition];
+}
+@end