Kaydet (Commit) 19168e3f authored tarafından siqi's avatar siqi

slideshow control pad

Change-Id: Ie82e10fcdfc495ac19a34be85249480540e88d1d
üst c154551d
...@@ -9,6 +9,12 @@ ...@@ -9,6 +9,12 @@
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
5753DD901781EA0300DB71BB /* serverList_vc.m in Sources */ = {isa = PBXBuildFile; fileRef = 5753DD8F1781EA0300DB71BB /* serverList_vc.m */; }; 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 */; }; 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 */; }; 57B152991764703500EECC67 /* Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 57B152981764703500EECC67 /* Base64.m */; };
57B1529F176486C300EECC67 /* CommandTransmitter.m in Sources */ = {isa = PBXBuildFile; fileRef = 57B1529E176486C300EECC67 /* CommandTransmitter.m */; }; 57B1529F176486C300EECC67 /* CommandTransmitter.m in Sources */ = {isa = PBXBuildFile; fileRef = 57B1529E176486C300EECC67 /* CommandTransmitter.m */; };
57B7625D17621E42007703F6 /* SlideShow.m in Sources */ = {isa = PBXBuildFile; fileRef = 57B7625C17621E42007703F6 /* SlideShow.m */; }; 57B7625D17621E42007703F6 /* SlideShow.m in Sources */ = {isa = PBXBuildFile; fileRef = 57B7625C17621E42007703F6 /* SlideShow.m */; };
...@@ -38,6 +44,13 @@ ...@@ -38,6 +44,13 @@
5753DD8F1781EA0300DB71BB /* serverList_vc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = serverList_vc.m; sourceTree = "<group>"; }; 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>"; }; 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>"; }; 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>"; }; 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>"; }; 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>"; }; 57B1529D176486C300EECC67 /* CommandTransmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommandTransmitter.h; sourceTree = "<group>"; };
...@@ -126,18 +139,20 @@ ...@@ -126,18 +139,20 @@
57C6E3F8175E06E800E8BC5F /* iosremote */ = { 57C6E3F8175E06E800E8BC5F /* iosremote */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
57C6E3F9175E06E800E8BC5F /* Supporting Files */,
57C6E40A175E06E800E8BC5F /* MainStoryboard_iPhone.storyboard */,
57FE71E11785C61300B50125 /* pinValidation_vc.h */, 57FE71E11785C61300B50125 /* pinValidation_vc.h */,
57FE71E21785C61400B50125 /* pinValidation_vc.m */, 57FE71E21785C61400B50125 /* pinValidation_vc.m */,
57FE71E41785D7FE00B50125 /* slideShowPreview_vc.h */, 57FE71E41785D7FE00B50125 /* slideShowPreview_vc.h */,
57FE71E51785D7FE00B50125 /* slideShowPreview_vc.m */, 57FE71E51785D7FE00B50125 /* slideShowPreview_vc.m */,
57C6E401175E06E800E8BC5F /* libreoffice_sdremoteAppDelegate.h */, 57C6E401175E06E800E8BC5F /* libreoffice_sdremoteAppDelegate.h */,
57C6E402175E06E800E8BC5F /* libreoffice_sdremoteAppDelegate.m */, 57C6E402175E06E800E8BC5F /* libreoffice_sdremoteAppDelegate.m */,
57C6E40A175E06E800E8BC5F /* MainStoryboard_iPhone.storyboard */, 57867A551787385800EBBE52 /* slideShow_vc.h */,
57867A561787385800EBBE52 /* slideShow_vc.m */,
5753DD9717834D7100DB71BB /* newServer_vc.h */, 5753DD9717834D7100DB71BB /* newServer_vc.h */,
5753DD9817834D7100DB71BB /* newServer_vc.m */, 5753DD9817834D7100DB71BB /* newServer_vc.m */,
5753DD8E1781EA0300DB71BB /* serverList_vc.h */, 5753DD8E1781EA0300DB71BB /* serverList_vc.h */,
5753DD8F1781EA0300DB71BB /* serverList_vc.m */, 5753DD8F1781EA0300DB71BB /* serverList_vc.m */,
57C6E3F9175E06E800E8BC5F /* Supporting Files */,
57CFED9717838FDC00E82E05 /* EditableTableViewCell.h */, 57CFED9717838FDC00E82E05 /* EditableTableViewCell.h */,
57CFED9817838FDC00E82E05 /* EditableTableViewCell.m */, 57CFED9817838FDC00E82E05 /* EditableTableViewCell.m */,
57FE71E717861A9000B50125 /* slideShowPreviewTable_vc.h */, 57FE71E717861A9000B50125 /* slideShowPreviewTable_vc.h */,
...@@ -149,6 +164,11 @@ ...@@ -149,6 +164,11 @@
57C6E3F9175E06E800E8BC5F /* Supporting Files */ = { 57C6E3F9175E06E800E8BC5F /* Supporting Files */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( 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 */, 57C6E3FA175E06E800E8BC5F /* iosremote-Info.plist */,
57C6E3FB175E06E800E8BC5F /* InfoPlist.strings */, 57C6E3FB175E06E800E8BC5F /* InfoPlist.strings */,
57C6E3FE175E06E800E8BC5F /* main.m */, 57C6E3FE175E06E800E8BC5F /* main.m */,
...@@ -237,6 +257,11 @@ ...@@ -237,6 +257,11 @@
57C6E407175E06E800E8BC5F /* Default@2x.png in Resources */, 57C6E407175E06E800E8BC5F /* Default@2x.png in Resources */,
57C6E409175E06E800E8BC5F /* Default-568h@2x.png in Resources */, 57C6E409175E06E800E8BC5F /* Default-568h@2x.png in Resources */,
57C6E40C175E06E800E8BC5F /* MainStoryboard_iPhone.storyboard 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; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -262,6 +287,7 @@ ...@@ -262,6 +287,7 @@
57FE71E31785C61400B50125 /* pinValidation_vc.m in Sources */, 57FE71E31785C61400B50125 /* pinValidation_vc.m in Sources */,
57FE71E61785D7FE00B50125 /* slideShowPreview_vc.m in Sources */, 57FE71E61785D7FE00B50125 /* slideShowPreview_vc.m in Sources */,
57FE71E917861A9000B50125 /* slideShowPreviewTable_vc.m in Sources */, 57FE71E917861A9000B50125 /* slideShowPreviewTable_vc.m in Sources */,
57867A571787385800EBBE52 /* slideShow_vc.m in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
......
...@@ -37,8 +37,15 @@ ...@@ -37,8 +37,15 @@
} }
NSLog(@"Command:%@", command); NSLog(@"Command:%@", command);
NSString *instruction = [command objectAtIndex:0]; NSString *instruction = [command objectAtIndex:0];
if ([instruction isEqualToString:STATUS_PAIRING_PINVALIDATION]) {
if([instruction isEqualToString:@"slideshow_started"]){ [[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"); NSLog(@"Interpreter: slideshow_started");
uint slideLength = [[command objectAtIndex:1] integerValue]; uint slideLength = [[command objectAtIndex:1] integerValue];
uint currentSlide = [[command objectAtIndex:2] integerValue]; uint currentSlide = [[command objectAtIndex:2] integerValue];
...@@ -83,7 +90,6 @@ ...@@ -83,7 +90,6 @@
AtIndex:slideNumber]; AtIndex:slideNumber];
[[NSNotificationCenter defaultCenter] postNotificationName:MSG_SLIDE_NOTES object: [NSNumber numberWithUnsignedInt:slideNumber]]; [[NSNotificationCenter defaultCenter] postNotificationName:MSG_SLIDE_NOTES object: [NSNumber numberWithUnsignedInt:slideNumber]];
} }
} }
} }
......
...@@ -37,7 +37,16 @@ ...@@ -37,7 +37,16 @@
*/ */
#define STATUS_CONNECTED_NOSLIDESHOW @"STATUS_CONNECTED_NOSLIDESHOW" #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" #define STATUS_CONNECTION_FAILED @"STATUS_CONNECTION_FAILED"
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
@interface CommunicationManager() @interface CommunicationManager()
@property (nonatomic, strong) Client* client; @property (nonatomic, strong) Client* client;
@property (nonatomic, strong) id connectionConnectedObserver;
@property (nonatomic, strong) id connectionDisconnectedObserver;
@end @end
...@@ -35,8 +33,6 @@ ...@@ -35,8 +33,6 @@
@synthesize transmitter = _transmitter; @synthesize transmitter = _transmitter;
@synthesize servers = _servers; @synthesize servers = _servers;
@synthesize delegate = _delegate; @synthesize delegate = _delegate;
@synthesize connectionConnectedObserver = _connectionConnectedObserver;
@synthesize connectionDisconnectedObserver = _connectionDisconnectedObserver;
+ (CommunicationManager *)sharedComManager + (CommunicationManager *)sharedComManager
{ {
...@@ -59,9 +55,6 @@ ...@@ -59,9 +55,6 @@
NSLog(@"Connected"); NSLog(@"Connected");
self.transmitter = [[CommandTransmitter alloc] initWithClient:self.client]; self.transmitter = [[CommandTransmitter alloc] initWithClient:self.client];
self.state = CONNECTED; self.state = CONNECTED;
[self.delegate performSegueWithIdentifier:@"pinValidation" sender:nil];
} else {
NSLog(@"Already connected");
} }
} else if ([[note name] isEqualToString:@"connection.status.disconnected"]){ } else if ([[note name] isEqualToString:@"connection.status.disconnected"]){
if (self.state != DISCONNECTED) { if (self.state != DISCONNECTED) {
......
...@@ -40,21 +40,21 @@ ...@@ -40,21 +40,21 @@
self.comManager = [CommunicationManager sharedComManager]; self.comManager = [CommunicationManager sharedComManager];
[self.pinLabel setText:[NSString stringWithFormat:@"%@", [self.comManager getPairingPin]]]; [self.pinLabel setText:[NSString stringWithFormat:@"%@", [self.comManager getPairingPin]]];
NSOperationQueue *mainQueue = [NSOperationQueue mainQueue]; NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
self.slideShowPreviewStartObserver = [[NSNotificationCenter defaultCenter] addObserverForName:STATUS_CONNECTED_SLIDESHOW_RUNNING self.slideShowPreviewStartObserver = [[NSNotificationCenter defaultCenter] addObserverForName:STATUS_PAIRING_PAIRED
object:nil object:nil
queue:mainQueue queue:mainQueue
usingBlock:^(NSNotification *note) { usingBlock:^(NSNotification *note) {
[self performSegueWithIdentifier:@"pinValidated" sender:self ]; [self performSegueWithIdentifier:@"pinValidated" sender:self ];
}]; }];
} }
//
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ //- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
if ([segue.identifier isEqualToString:@"pinValidated"]) { // if ([segue.identifier isEqualToString:@"pinValidated"]) {
slideShowPreview_vc *destViewController = segue.destinationViewController; // slideShowPreview_vc *destViewController = segue.destinationViewController;
destViewController.slideshow = [self.comManager.interpreter slideShow]; // destViewController.slideshow = [self.comManager.interpreter slideShow];
[destViewController.slideshow setDelegate:destViewController]; // [destViewController.slideshow setDelegate:destViewController];
} // }
} //}
- (void)didReceiveMemoryWarning - (void)didReceiveMemoryWarning
{ {
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="4" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="528" y="118"/> <point key="canvasLocation" x="80" y="-294"/>
</scene> </scene>
<!--Pin Validation vc--> <!--Pin Validation vc-->
<scene sceneID="aCW-l9-UDx"> <scene sceneID="aCW-l9-UDx">
...@@ -73,8 +73,8 @@ ...@@ -73,8 +73,8 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/> <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </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"> <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="53"/> <rect key="frame" x="29" y="208" width="271" height="65"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="Helvetica-Light" family="Helvetica" pointSize="15"/> <fontDescription key="fontDescription" name="Helvetica-Light" family="Helvetica" pointSize="15"/>
<color key="textColor" name="alternateSelectedControlColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="alternateSelectedControlColor" catalog="System" colorSpace="catalog"/>
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iok-RC-uS6" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="iok-RC-uS6" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="528" y="872"/> <point key="canvasLocation" x="80" y="460"/>
</scene> </scene>
<!--New Server View Controller - New Server--> <!--New Server View Controller - New Server-->
<scene sceneID="tlJ-c5-Jp2"> <scene sceneID="tlJ-c5-Jp2">
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
</tableViewController> </tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="b5I-aN-vyr" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="b5I-aN-vyr" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="1052" y="-63"/> <point key="canvasLocation" x="604" y="-475"/>
</scene> </scene>
<!--View Controller--> <!--View Controller-->
<scene sceneID="ccD-EG-LMW"> <scene sceneID="ccD-EG-LMW">
...@@ -178,10 +178,75 @@ ...@@ -178,10 +178,75 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view> </view>
<navigationItem key="navigationItem" id="rqp-6S-yX6"/> <navigationItem key="navigationItem" id="rqp-6S-yX6"/>
<connections>
<segue destination="Ivv-3X-Nhr" kind="push" identifier="slideShowSegue" id="mqm-h4-xUD"/>
</connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="APz-RZ-QFt" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="APz-RZ-QFt" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </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> </scene>
<!--Slide Show Preview Table vc--> <!--Slide Show Preview Table vc-->
<scene sceneID="Tvi-bD-vMC"> <scene sceneID="Tvi-bD-vMC">
...@@ -190,73 +255,34 @@ ...@@ -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"> <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"/> <rect key="frame" x="0.0" y="0.0" width="320" height="308"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> <color key="backgroundColor" cocoaTouchSystemColor="scrollViewTexturedBackgroundColor"/>
<sections> <sections>
<tableViewSection id="8wQ-rK-ve4"> <tableViewSection id="8wQ-rK-ve4">
<cells> <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"/> <rect key="frame" x="0.0" y="10" width="320" height="45"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="1" width="300" height="43"/> <rect key="frame" x="10" y="1" width="300" height="43"/>
<autoresizingMask key="autoresizingMask"/> <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"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view> </view>
</tableViewCell> </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"/> <rect key="frame" x="0.0" y="55" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="0.0" width="300" height="43"/> <rect key="frame" x="10" y="0.0" width="300" height="43"/>
<autoresizingMask key="autoresizingMask"/> <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"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view> </view>
</tableViewCell> </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"/> <rect key="frame" x="0.0" y="99" width="320" height="45"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="0.0" width="300" height="43"/> <rect key="frame" x="10" y="0.0" width="300" height="43"/>
<autoresizingMask key="autoresizingMask"/> <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"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view> </view>
</tableViewCell> </tableViewCell>
...@@ -264,17 +290,17 @@ ...@@ -264,17 +290,17 @@
</tableViewSection> </tableViewSection>
</sections> </sections>
<connections> <connections>
<outlet property="dataSource" destination="Ybo-9c-MB8" id="GrB-3r-c8s"/> <outlet property="dataSource" destination="Ybo-9c-MB8" id="nDU-cr-5RV"/>
<outlet property="delegate" destination="Ybo-9c-MB8" id="QI6-vt-nrW"/> <outlet property="delegate" destination="Ybo-9c-MB8" id="6Gf-g5-zXK"/>
</connections> </connections>
</tableView> </tableView>
<connections> <connections>
<outlet property="optionTableView" destination="rWA-v3-wtf" id="kpL-OO-92A"/> <outlet property="optionsTable" destination="rWA-v3-wtf" id="qXR-p3-aap"/>
</connections> </connections>
</tableViewController> </tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="z5S-eI-1pb" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="z5S-eI-1pb" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="1581" y="1002"/> <point key="canvasLocation" x="1133" y="590"/>
</scene> </scene>
<!--Navigation Controller--> <!--Navigation Controller-->
<scene sceneID="yRe-s4-oKK"> <scene sceneID="yRe-s4-oKK">
...@@ -292,32 +318,66 @@ ...@@ -292,32 +318,66 @@
</navigationController> </navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="f9j-Cw-dxh" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="f9j-Cw-dxh" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="68" y="75"/> <point key="canvasLocation" x="-380" y="-337"/>
</scene> </scene>
<!--View Controller--> <!--View Controller-->
<scene sceneID="kRQ-fB-NKx"> <scene sceneID="kRQ-fB-NKx">
<objects> <objects>
<placeholder placeholderIdentifier="IBFirstResponder" id="uCa-zh-PLh" userLabel="First Responder" sceneMemberID="firstResponder"/>
<viewController id="HMh-Ba-7X9" sceneMemberID="viewController"> <viewController id="HMh-Ba-7X9" sceneMemberID="viewController">
<view key="view" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="Swz-wK-30Z"> <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"/> <rect key="frame" x="0.0" y="0.0" width="320" height="197"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="Default@2x.png" id="qyi-U8-2KF"> <view contentMode="scaleToFill" id="2Zo-K8-3NM">
<rect key="frame" x="0.0" y="0.0" width="320" height="197"/> <rect key="frame" x="13" y="14" width="295" height="169"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView> <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> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</subviews>
<color key="backgroundColor" cocoaTouchSystemColor="scrollViewTexturedBackgroundColor"/>
</view> </view>
<toolbarItems/> <toolbarItems/>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="uCa-zh-PLh" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="1581" y="684"/> <point key="canvasLocation" x="1133" y="272"/>
</scene> </scene>
</scenes> </scenes>
<resources> <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> </resources>
<classes> <classes>
<class className="EditableTableViewCell" superclassName="UITableViewCell"> <class className="EditableTableViewCell" superclassName="UITableViewCell">
...@@ -344,6 +404,17 @@ ...@@ -344,6 +404,17 @@
</class> </class>
<class className="slideShowPreviewTable_vc" superclassName="UITableViewController"> <class className="slideShowPreviewTable_vc" superclassName="UITableViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/slideShowPreviewTable_vc.h"/> <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> </class>
</classes> </classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics"> <simulatedMetricsContainer key="defaultSimulatedMetrics">
......
//
// 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
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
@property (nonatomic, strong) CommunicationManager *comManager; @property (nonatomic, strong) CommunicationManager *comManager;
@property (nonatomic, weak) NSNotificationCenter* center; @property (nonatomic, weak) NSNotificationCenter* center;
@property (nonatomic, strong) id slideShowPreviewStartObserver; @property (nonatomic, strong) id slideShowPreviewStartObserver;
@property (nonatomic, strong) id pinValidationObserver;
@property (nonatomic, strong) NSIndexPath *lastSpinningCellIndex; @property (nonatomic, strong) NSIndexPath *lastSpinningCellIndex;
@end @end
...@@ -26,6 +27,7 @@ ...@@ -26,6 +27,7 @@
@synthesize comManager = _comManager; @synthesize comManager = _comManager;
@synthesize lastSpinningCellIndex = _lastSpinningCellIndex; @synthesize lastSpinningCellIndex = _lastSpinningCellIndex;
@synthesize slideShowPreviewStartObserver = _slideShowPreviewStartObserver; @synthesize slideShowPreviewStartObserver = _slideShowPreviewStartObserver;
@synthesize pinValidationObserver = _pinValidationObserver;
- (id)initWithStyle:(UITableViewStyle)style - (id)initWithStyle:(UITableViewStyle)style
{ {
...@@ -52,7 +54,13 @@ ...@@ -52,7 +54,13 @@
self.serverTable.delegate = self; self.serverTable.delegate = self;
NSOperationQueue *mainQueue = [NSOperationQueue mainQueue]; 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:@"pinValidation" sender:self ];
}];
self.slideShowPreviewStartObserver = [[NSNotificationCenter defaultCenter] addObserverForName:STATUS_PAIRING_PAIRED
object:nil object:nil
queue:mainQueue queue:mainQueue
usingBlock:^(NSNotification *note) { usingBlock:^(NSNotification *note) {
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
@interface slideShowPreviewTable_vc : UITableViewController @interface slideShowPreviewTable_vc : UITableViewController <UITableViewDataSource, UITableViewDelegate>
@property (strong, nonatomic) IBOutlet UITableView *optionsTable;
@end @end
...@@ -7,16 +7,21 @@ ...@@ -7,16 +7,21 @@
// //
#import "slideShowPreviewTable_vc.h" #import "slideShowPreviewTable_vc.h"
#import "CommunicationManager.h"
#import "CommandTransmitter.h"
@interface slideShowPreviewTable_vc () @interface slideShowPreviewTable_vc ()
@property (nonatomic, strong) UIButton * startButton; @property (nonatomic, weak) UIButton * startButton;
@property (nonatomic, strong) NSArray * optionsArray;
@property (nonatomic, strong) CommunicationManager * comManager;
@end @end
@implementation slideShowPreviewTable_vc @implementation slideShowPreviewTable_vc
@synthesize startButton = _startButton; @synthesize startButton = _startButton;
@synthesize optionsTable = _optionsTable;
@synthesize optionsArray = _optionsArray;
- (id)initWithStyle:(UITableViewStyle)style - (id)initWithStyle:(UITableViewStyle)style
{ {
...@@ -36,6 +41,9 @@ ...@@ -36,6 +41,9 @@
// Uncomment the following line to display an Edit button in the navigation bar for this view controller. // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem; // 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 - (void)didReceiveMemoryWarning
...@@ -46,26 +54,25 @@ ...@@ -46,26 +54,25 @@
#pragma mark - Table view data source #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 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{ {
#warning Incomplete method implementation. return [self.optionsArray count];
// Return the number of rows in the section.
return 0;
} }
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
static NSString *CellIdentifier = @"Cell"; static NSString *CellIdentifier = @"optionCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; 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; return cell;
} }
...@@ -110,28 +117,21 @@ ...@@ -110,28 +117,21 @@
*/ */
-(IBAction)startPresentationAction:(id)sender { -(IBAction)startPresentationAction:(id)sender {
[[self.comManager transmitter] startPresentation];
UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Reset" [self performSegueWithIdentifier:@"slideShowSegue" sender:self];
message:@"You just pressed the Reset button"
delegate:self
cancelButtonTitle:@"Acknowledged"
otherButtonTitles:nil];
[alert show];
} }
- (UIButton *)startButton{ - (UIButton *)startButton{
if (self.startButton == nil) if (_startButton == nil) {
{ _startButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
_startButton.frame = CGRectMake(10.0, 10.0, 300.0, 50.0);
self.startButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [_startButton setTitle:@"Start Presentation" forState:UIControlStateNormal];
self.startButton.frame = CGRectMake(20.0, 40 , 95.0, 37.0); _startButton.backgroundColor = [UIColor clearColor];
[self.startButton setTitle:@"Start Presentation" forState:UIControlStateNormal]; [_startButton addTarget:self action:@selector(startPresentationAction:) forControlEvents:UIControlEventTouchDown];
self.startButton.backgroundColor = [UIColor clearColor];
[self.startButton addTarget:self action:@selector(startPresentationAction:) forControlEvents:UIControlEventTouchDown]; _startButton.tag = 1;
self.startButton.tag = 1;
} }
return self.startButton; return _startButton;
} }
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
...@@ -146,23 +146,20 @@ ...@@ -146,23 +146,20 @@
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{ {
return 100.0; return 50.0;
} }
#pragma mark - Table view delegate #pragma mark - Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{ {
// Navigation logic may go here. Create and push another view controller. UITableViewCell * cell = [tableView cellForRowAtIndexPath:indexPath];
/* UISwitch * toggle = [[[cell accessoryView] subviews] objectAtIndex:0];
<#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil]; [toggle setOn:![toggle isOn] animated:YES];
// ...
// Pass the selected object to the new view controller.
[self.navigationController pushViewController:detailViewController animated:YES];
*/
} }
- (void)viewDidUnload { - (void)viewDidUnload {
[self setOptionsTable:nil];
[super viewDidUnload]; [super viewDidUnload];
} }
@end @end
//
// 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
//
// 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment