[Libreoffice-commits] core.git: 4 commits - ios/iosremote
siqi
me at siqi.fr
Sat Jul 6 03:50:05 PDT 2013
dev/null |binary
ios/iosremote/.DS_Store |binary
ios/iosremote/iosremote.xcodeproj/project.pbxproj | 30 +
ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate |binary
ios/iosremote/iosremote/Communication/Client.m | 2
ios/iosremote/iosremote/Communication/CommandInterpreter.m | 36 +
ios/iosremote/iosremote/Communication/CommunicationManager.h | 11
ios/iosremote/iosremote/Communication/CommunicationManager.m | 7
ios/iosremote/iosremote/Communication/SlideShow.h | 2
ios/iosremote/iosremote/Communication/SlideShow.m | 44 +-
ios/iosremote/iosremote/Communication/pinValidation_vc.m | 22 -
ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard | 193 ++++++----
ios/iosremote/iosremote/impress.jpeg |binary
ios/iosremote/iosremote/iosremote-Prefix.pch | 14
ios/iosremote/iosremote/pushed_next_button.png |binary
ios/iosremote/iosremote/pushed_previous_button.png |binary
ios/iosremote/iosremote/released_next_button.png |binary
ios/iosremote/iosremote/released_previous_button.png |binary
ios/iosremote/iosremote/serverList_vc.m | 27 +
ios/iosremote/iosremote/slideShowPreviewTable_vc.h | 4
ios/iosremote/iosremote/slideShowPreviewTable_vc.m | 92 ++--
ios/iosremote/iosremote/slideShowPreview_vc.h | 4
ios/iosremote/iosremote/slideShowPreview_vc.m | 26 -
ios/iosremote/iosremote/slideShow_vc.h | 19
ios/iosremote/iosremote/slideShow_vc.m | 101 +++++
25 files changed, 450 insertions(+), 184 deletions(-)
New commits:
commit eb25bb6dc4273bb6fc8511b751092899d545dcae
Author: siqi <me at siqi.fr>
Date: Sat Jul 6 12:43:20 2013 +0200
various bug fixes & slideshow control pad
Change-Id: I4bda3506f3c37be12795c9ed5787df1e7ced9014
diff --git a/ios/iosremote/.DS_Store b/ios/iosremote/.DS_Store
index 9940e91..eb47908 100644
Binary files a/ios/iosremote/.DS_Store and b/ios/iosremote/.DS_Store differ
diff --git a/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate b/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate
index 3c57b1f..ad79816 100644
Binary files a/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate and b/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/ios/iosremote/iosremote/Communication/Client.m b/ios/iosremote/iosremote/Communication/Client.m
index a75bc6f..c3cbb93 100644
--- a/ios/iosremote/iosremote/Communication/Client.m
+++ b/ios/iosremote/iosremote/Communication/Client.m
@@ -175,7 +175,7 @@ int count = 0;
case NSStreamEventHasBytesAvailable:
{
NSMutableData* data;
- NSLog(@"NSStreamEventHasBytesAvailable");
+// NSLog(@"NSStreamEventHasBytesAvailable");
if(!data) {
data = [[NSMutableData alloc] init];
}
diff --git a/ios/iosremote/iosremote/Communication/CommandInterpreter.m b/ios/iosremote/iosremote/Communication/CommandInterpreter.m
index f66e624..5fc831d 100644
--- a/ios/iosremote/iosremote/Communication/CommandInterpreter.m
+++ b/ios/iosremote/iosremote/Communication/CommandInterpreter.m
@@ -20,10 +20,11 @@
@synthesize slideShow = _slideShow;
-- (SlideShow*) slideshow{
- if (!self.slideShow)
- self.slideShow = [[SlideShow alloc] init];
- return self.slideShow;
+- (CommandInterpreter *) init
+{
+ self = [super init];
+ self.slideShow = [[SlideShow alloc] init];
+ return self;
}
- (BOOL) isSlideRunning {
@@ -44,12 +45,12 @@
else if ([instruction isEqualToString:STATUS_PAIRING_PAIRED]){
[[NSNotificationCenter defaultCenter] postNotificationName:STATUS_PAIRING_PAIRED
object:nil];
+ // @TODO take care of the trailing slideshow_started&slideshow_finished
}
else if([instruction isEqualToString:@"slideshow_started"]){
- NSLog(@"Interpreter: slideshow_started");
uint slideLength = [[command objectAtIndex:1] integerValue];
uint currentSlide = [[command objectAtIndex:2] integerValue];
- self.slideShow = [[SlideShow alloc] init];
+ NSLog(@"Interpreter: slideshow_started with currentSlide: %u slideLength: %u", currentSlide, slideLength);
[self.slideShow setSize:slideLength];
[self.slideShow setCurrentSlide:currentSlide];
@@ -63,8 +64,6 @@
self.slideShow = [[SlideShow alloc] init];
[[NSNotificationCenter defaultCenter] postNotificationName:STATUS_CONNECTED_NOSLIDESHOW object:nil];
} else {
- if (self.slideShow == nil)
- return;
if ([instruction isEqualToString:@"slide_updated"]) {
NSLog(@"Interpreter: slide_updated");
uint newSlideNumber = [[command objectAtIndex:1] integerValue];
@@ -76,11 +75,18 @@
NSLog(@"Interpreter: slide_preview");
uint slideNumber = [[command objectAtIndex:1] integerValue];
NSString * imageData = [command objectAtIndex:2];
-
[self.slideShow putImage:imageData
AtIndex:slideNumber];
[[NSNotificationCenter defaultCenter] postNotificationName:MSG_SLIDE_PREVIEW object:[NSNumber numberWithUnsignedInt:slideNumber]];
+ if ([[command objectAtIndex:4] isEqualToString:@"slide_notes"])
+ {
+ NSRange range;
+ range.location = 4;
+ range.length = [command count] - 4;
+ [self parse:[command subarrayWithRange:range]];
+ }
} else if ([instruction isEqualToString:@"slide_notes"]){
+ NSLog(@"Interpreter: slide_notes");
uint slideNumber = [[command objectAtIndex:1] integerValue];
NSMutableString *notes = [[NSMutableString alloc] init];
for (int i = 2; i<command.count; ++i) {
diff --git a/ios/iosremote/iosremote/Communication/SlideShow.h b/ios/iosremote/iosremote/Communication/SlideShow.h
index 8d89533..e49ba3f 100644
--- a/ios/iosremote/iosremote/Communication/SlideShow.h
+++ b/ios/iosremote/iosremote/Communication/SlideShow.h
@@ -15,7 +15,7 @@
@property uint size;
@property uint currentSlide;
- at property (nonatomic, strong) slideShowPreview_vc* delegate;
+ at property (nonatomic, strong) id delegate;
- (void) putImage: (NSString *)img AtIndex: (uint) index;
- (void) putNotes: (NSString *)notes AtIndex: (uint) index;
diff --git a/ios/iosremote/iosremote/Communication/SlideShow.m b/ios/iosremote/iosremote/Communication/SlideShow.m
index 7048569..b06429e 100644
--- a/ios/iosremote/iosremote/Communication/SlideShow.m
+++ b/ios/iosremote/iosremote/Communication/SlideShow.m
@@ -9,7 +9,7 @@
#import "SlideShow.h"
#import "Base64.h"
-#import "slideShowPreview_vc.h"
+#import "slideShow_vc.h"
#import <dispatch/dispatch.h>
@interface SlideShow()
@@ -39,28 +39,30 @@ dispatch_queue_t backgroundQueue;
_currentSlide = 0;
backgroundQueue = dispatch_queue_create("org.libreoffice.iosremote.bgqueue", NULL);
-// NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
+ NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
-// self.slideShowImageReadyObserver =[[NSNotificationCenter defaultCenter]
-// addObserverForName:@"storage_update_image_ready"
-// object:nil
-// queue:mainQueue
-// usingBlock:^(NSNotification *note) {
-// if ([[[note userInfo] objectForKey:@"index"] intValue] == self.lastRequestedImage) {
-// [self.delegate.image setImage:[self getImageAtIndex:self.lastRequestedImage]];
-// self.lastRequestedImage = -1;
-// }
-// }];
+ self.slideShowImageReadyObserver =[[NSNotificationCenter defaultCenter]
+ addObserverForName:@"storage_update_image_ready"
+ object:nil
+ queue:mainQueue
+ usingBlock:^(NSNotification *note) {
+ if ([[[note userInfo] objectForKey:@"index"] intValue] == self.lastRequestedImage) {
+// NSLog(@"Load last requsted image");
+ [[self.delegate slideView] setImage:[self getImageAtIndex:self.lastRequestedImage]];
+ self.lastRequestedImage = -1;
+ }
+ }];
-// self.slideShowNoteReadyObserver = [[NSNotificationCenter defaultCenter] addObserverForName:@"storage_update_note_ready"
-// object:nil
-// queue:mainQueue
-// usingBlock:^(NSNotification *note) {
-// if ([[[note userInfo] objectForKey:@"index"] intValue] == self.lastRequestedNote) {
-// [self.delegate.lecturer_notes loadHTMLString:[self getNotesAtIndex:self.lastRequestedNote] baseURL:nil];
-// self.lastRequestedNote = -1;
-// }
-// }];
+ self.slideShowNoteReadyObserver = [[NSNotificationCenter defaultCenter] addObserverForName:@"storage_update_note_ready"
+ object:nil
+ queue:mainQueue
+ usingBlock:^(NSNotification *note) {
+// NSLog(@"Load last requsted note");
+ if ([[[note userInfo] objectForKey:@"index"] intValue] == self.lastRequestedNote) {
+ [[self.delegate lecturer_notes] loadHTMLString:[self getNotesAtIndex:self.lastRequestedNote] baseURL:nil];
+ self.lastRequestedNote = -1;
+ }
+ }];
return self;
}
diff --git a/ios/iosremote/iosremote/Communication/pinValidation_vc.m b/ios/iosremote/iosremote/Communication/pinValidation_vc.m
index 6c81043..7a8c4d8 100644
--- a/ios/iosremote/iosremote/Communication/pinValidation_vc.m
+++ b/ios/iosremote/iosremote/Communication/pinValidation_vc.m
@@ -39,6 +39,10 @@
// Do any additional setup after loading the view.
self.comManager = [CommunicationManager sharedComManager];
[self.pinLabel setText:[NSString stringWithFormat:@"%@", [self.comManager getPairingPin]]];
+}
+
+- (void) viewDidAppear:(BOOL)animated
+{
NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
self.slideShowPreviewStartObserver = [[NSNotificationCenter defaultCenter] addObserverForName:STATUS_PAIRING_PAIRED
object:nil
@@ -46,15 +50,15 @@
usingBlock:^(NSNotification *note) {
[self performSegueWithIdentifier:@"pinValidated" sender:self ];
}];
+ [super viewDidAppear:animated];
}
-//
-//- (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) viewDidDisappear:(BOOL)animated
+{
+ [[NSNotificationCenter defaultCenter] removeObserver:self.slideShowPreviewStartObserver];
+ [super viewDidDisappear:animated];
+}
+
- (void)didReceiveMemoryWarning
{
diff --git a/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard b/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard
index 2c477f8..28cf722 100644
--- a/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard
+++ b/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard
@@ -194,21 +194,13 @@
<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">
+ <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" id="bZq-z2-OKU">
<rect key="frame" x="0.0" y="20" width="320" height="177"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="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"/>
+ <autoresizingMask key="autoresizingMask" flexibleMinX="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"/>
@@ -236,17 +228,23 @@
<action selector="previousSlideAction:" destination="Ivv-3X-Nhr" eventType="touchUpInside" id="DAf-Qp-7KW"/>
</connections>
</button>
+ <webView contentMode="scaleToFill" id="xGi-A7-hat">
+ <rect key="frame" x="20" y="333" width="280" height="151"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ </webView>
</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"/>
+ <outlet property="lecturer_notes" destination="xGi-A7-hat" id="Cng-HM-0wW"/>
+ <outlet property="slideView" destination="bZq-z2-OKU" id="yu0-P8-F3v"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Uei-nM-J1S" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
- <point key="canvasLocation" x="620" y="1208"/>
+ <point key="canvasLocation" x="620" y="1109"/>
</scene>
<!--Slide Show Preview Table vc-->
<scene sceneID="Tvi-bD-vMC">
@@ -300,7 +298,7 @@
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="z5S-eI-1pb" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
- <point key="canvasLocation" x="1133" y="590"/>
+ <point key="canvasLocation" x="1133" y="648"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="yRe-s4-oKK">
@@ -323,7 +321,6 @@
<!--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"/>
@@ -369,6 +366,7 @@
</view>
<toolbarItems/>
</viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="uCa-zh-PLh" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1133" y="272"/>
</scene>
@@ -414,6 +412,8 @@
<relationships>
<relationship kind="action" name="nextSlideAction:"/>
<relationship kind="action" name="previousSlideAction:"/>
+ <relationship kind="outlet" name="lecturer_notes" candidateClass="UIWebView"/>
+ <relationship kind="outlet" name="slideView" candidateClass="UIImageView"/>
</relationships>
</class>
</classes>
@@ -425,4 +425,4 @@
<inferredMetricsTieBreakers>
<segue reference="geL-Q8-f61"/>
</inferredMetricsTieBreakers>
-</document>
+</document>
\ No newline at end of file
diff --git a/ios/iosremote/iosremote/serverList_vc.m b/ios/iosremote/iosremote/serverList_vc.m
index 141cadd..8433f55 100644
--- a/ios/iosremote/iosremote/serverList_vc.m
+++ b/ios/iosremote/iosremote/serverList_vc.m
@@ -52,22 +52,35 @@
self.comManager = [CommunicationManager sharedComManager];
self.serverTable.dataSource = self;
self.serverTable.delegate = self;
-
+}
+
+
+- (void) viewDidAppear:(BOOL)animated
+{
NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
self.pinValidationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:STATUS_PAIRING_PINVALIDATION
- object:nil
- queue:mainQueue
- usingBlock:^(NSNotification *note) {
- [self performSegueWithIdentifier:@"pinValidation" sender:self ];
- }];
+ object:nil
+ queue:mainQueue
+ usingBlock:^(NSNotification *note) {
+ [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 ];
}];
+ [super viewDidAppear:animated];
+}
+
+- (void) viewDidDisappear:(BOOL)animated
+{
+ [[NSNotificationCenter defaultCenter] removeObserver:self.slideShowPreviewStartObserver];
+ [[NSNotificationCenter defaultCenter] removeObserver:self.pinValidationObserver];
+ [super viewDidDisappear:animated];
}
+
-(void)viewWillAppear:(BOOL)animated
{
[self.serverTable reloadData];
diff --git a/ios/iosremote/iosremote/slideShowPreviewTable_vc.m b/ios/iosremote/iosremote/slideShowPreviewTable_vc.m
index 0e3a5f6..76f3344 100644
--- a/ios/iosremote/iosremote/slideShowPreviewTable_vc.m
+++ b/ios/iosremote/iosremote/slideShowPreviewTable_vc.m
@@ -15,6 +15,8 @@
@property (nonatomic, weak) UIButton * startButton;
@property (nonatomic, strong) NSArray * optionsArray;
@property (nonatomic, strong) CommunicationManager * comManager;
+ at property (nonatomic, strong) id slideShowStartObserver;
+
@end
@implementation slideShowPreviewTable_vc
@@ -44,6 +46,24 @@
self.optionsArray = [NSArray arrayWithObjects:@"Lecturer's Notes", @"Timer", @"Pointer", nil];
self.comManager = [CommunicationManager sharedComManager];
self.comManager.delegate = self;
+ }
+
+- (void) viewDidAppear:(BOOL)animated
+{
+ NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
+ self.slideShowStartObserver = [[NSNotificationCenter defaultCenter] addObserverForName:STATUS_CONNECTED_SLIDESHOW_RUNNING
+ object:nil
+ queue:mainQueue
+ usingBlock:^(NSNotification *note) {
+ [self.parentViewController performSegueWithIdentifier:@"slideShowSegue" sender:self];
+ }];
+ [super viewDidAppear:animated];
+}
+
+- (void) viewDidDisappear:(BOOL)animated
+{
+ [[NSNotificationCenter defaultCenter] removeObserver:self.slideShowStartObserver];
+ [super viewDidDisappear:animated];
}
- (void)didReceiveMemoryWarning
@@ -118,7 +138,6 @@
-(IBAction)startPresentationAction:(id)sender {
[[self.comManager transmitter] startPresentation];
- [self performSegueWithIdentifier:@"slideShowSegue" sender:self];
}
- (UIButton *)startButton{
diff --git a/ios/iosremote/iosremote/slideShowPreview_vc.h b/ios/iosremote/iosremote/slideShowPreview_vc.h
index b00a506..ffa198b 100644
--- a/ios/iosremote/iosremote/slideShowPreview_vc.h
+++ b/ios/iosremote/iosremote/slideShowPreview_vc.h
@@ -12,8 +12,4 @@
@interface slideShowPreview_vc : UITableViewController
- at property (nonatomic, strong) SlideShow* slideshow;
- at property (nonatomic, strong) id slideShowImageReadyObserver;
- at property (nonatomic, strong) id slideShowNoteReadyObserver;
-
@end
diff --git a/ios/iosremote/iosremote/slideShowPreview_vc.m b/ios/iosremote/iosremote/slideShowPreview_vc.m
index 1090f8f6..fa986e5 100644
--- a/ios/iosremote/iosremote/slideShowPreview_vc.m
+++ b/ios/iosremote/iosremote/slideShowPreview_vc.m
@@ -8,19 +8,19 @@
#import "slideShowPreview_vc.h"
#import "SlideShow.h"
+#import "CommandInterpreter.h"
#import "CommunicationManager.h"
@interface slideShowPreview_vc ()
@property (nonatomic, strong) CommunicationManager* comManager;
+ at property (nonatomic, strong) SlideShow* slideshow;
@end
@implementation slideShowPreview_vc
@synthesize slideshow = _slideshow;
- at synthesize slideShowImageReadyObserver = _slideShowImageReadyObserver;
- at synthesize slideShowNoteReadyObserver = _slideShowNoteReadyObserver;
@synthesize comManager = _comManager;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
@@ -36,28 +36,8 @@
{
[super viewDidLoad];
// Do any additional setup after loading the view.
-// NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
-// NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
-
-// self.slideShowImageReadyObserver =[center addObserverForName:MSG_SLIDE_CHANGED
-// object:nil
-// queue:mainQueue
-// usingBlock:^(NSNotification *note) {
-// NSLog(@"Getting slide: %u image to display: %@", self.slideshow.currentSlide, [self.slideshow getImageAtIndex:self.slideshow.currentSlide]);
-//
-// [self.image setImage:[self.slideshow getImageAtIndex:self.slideshow.currentSlide]];
-// [self.lecturer_notes loadHTMLString: [self.slideshow getNotesAtIndex:self.slideshow.currentSlide]baseURL:nil];
-// }];
-//
-// self.slideShowNoteReadyObserver = [center addObserverForName:STATUS_CONNECTED_NOSLIDESHOW
-// object:nil
-// queue:mainQueue
-// usingBlock:^(NSNotification *note) {
-// [self.navigationController popViewControllerAnimated:YES];
-// }];
-
-// [self.image setImage:[self.slideshow getImageAtIndex:0]];
self.comManager = [CommunicationManager sharedComManager];
+ self.slideshow = [[self.comManager interpreter] slideShow];
}
- (void)didReceiveMemoryWarning
diff --git a/ios/iosremote/iosremote/slideShow_vc.h b/ios/iosremote/iosremote/slideShow_vc.h
index 654b1db..fb6a3b2 100644
--- a/ios/iosremote/iosremote/slideShow_vc.h
+++ b/ios/iosremote/iosremote/slideShow_vc.h
@@ -13,4 +13,7 @@
- (IBAction)nextSlideAction:(id)sender;
- (IBAction)previousSlideAction:(id)sender;
+ at property (weak, nonatomic) IBOutlet UIWebView *lecturer_notes;
+ at property (weak, nonatomic) IBOutlet UIImageView *slideView;
+
@end
diff --git a/ios/iosremote/iosremote/slideShow_vc.m b/ios/iosremote/iosremote/slideShow_vc.m
index 9570704..8eebb2d 100644
--- a/ios/iosremote/iosremote/slideShow_vc.m
+++ b/ios/iosremote/iosremote/slideShow_vc.m
@@ -7,18 +7,26 @@
//
#import "slideShow_vc.h"
+#import "SlideShow.h"
#import "CommunicationManager.h"
+#import "CommandInterpreter.h"
#import "CommandTransmitter.h"
@interface slideShow_vc ()
@property (nonatomic, strong) CommunicationManager *comManager;
+ at property (nonatomic, strong) id slideShowImageNoteReadyObserver;
+ at property (nonatomic, strong) id slideShowFinishedObserver;
+ at property (nonatomic, strong) SlideShow* slideshow;
@end
@implementation slideShow_vc
@synthesize comManager = _comManager;
+ at synthesize slideShowImageNoteReadyObserver = _slideShowImageNoteReadyObserver;
+ at synthesize slideShowFinishedObserver = _slideShowFinishedObserver;
+ at synthesize slideshow = _slideshow;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
@@ -33,8 +41,44 @@
{
[super viewDidLoad];
self.comManager = [CommunicationManager sharedComManager];
+ self.slideshow = [self.comManager.interpreter slideShow];
+ self.slideshow.delegate = self;
}
+
+- (void) viewDidAppear:(BOOL)animated
+{
+ NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
+ NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
+
+ self.slideShowImageNoteReadyObserver =[center addObserverForName:MSG_SLIDE_CHANGED
+ object:nil
+ queue:mainQueue
+ usingBlock:^(NSNotification *note) {
+ NSLog(@"Getting slide: %u image to display: %@", self.slideshow.currentSlide, [self.slideshow getImageAtIndex:self.slideshow.currentSlide]);
+
+ [self.slideView setImage:[self.slideshow getImageAtIndex:self.slideshow.currentSlide]];
+ [self.lecturer_notes loadHTMLString: [self.slideshow getNotesAtIndex:self.slideshow.currentSlide]baseURL:nil];
+ }];
+
+ self.slideShowFinishedObserver = [center addObserverForName:STATUS_CONNECTED_NOSLIDESHOW
+ object:nil
+ queue:mainQueue
+ usingBlock:^(NSNotification *note) {
+ [self.navigationController popViewControllerAnimated:YES];
+ }];
+ [super viewDidAppear:animated];
+}
+
+- (void) viewDidDisappear:(BOOL)animated
+{
+ [[NSNotificationCenter defaultCenter] removeObserver:self.slideShowFinishedObserver];
+ [[NSNotificationCenter defaultCenter] removeObserver:self.slideShowImageNoteReadyObserver];
+ [super viewDidDisappear:animated];
+}
+
+
+
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
@@ -42,6 +86,8 @@
}
- (void)viewDidUnload {
+ [self setLecturer_notes:nil];
+ [self setSlideView:nil];
[super viewDidUnload];
}
commit e2a3172542e1a661fefe22c8116d897e984884df
Author: siqi <me at siqi.fr>
Date: Fri Jul 5 21:42:37 2013 +0200
conflict
Change-Id: I495b0e2823fee787379bf13ea238b19ef1c54fe7
diff --git a/ios/iosremote/iosremote/Communication/.DS_Store b/ios/iosremote/iosremote/Communication/.DS_Store
deleted file mode 100644
index 83d9e2a..0000000
Binary files a/ios/iosremote/iosremote/Communication/.DS_Store and /dev/null differ
commit 70cd7c78bc3521bc9d7598085dca354534b1f9d8
Author: siqi <me at siqi.fr>
Date: Fri Jul 5 21:33:24 2013 +0200
slideshow control pad
Change-Id: Ie82e10fcdfc495ac19a34be85249480540e88d1d
diff --git a/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard b/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard
index ab8a55f..2c477f8 100644
--- a/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard
+++ b/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard
@@ -425,4 +425,4 @@
<inferredMetricsTieBreakers>
<segue reference="geL-Q8-f61"/>
</inferredMetricsTieBreakers>
-</document>
\ No newline at end of file
+</document>
commit 19168e3f7a337b85e9a5835fb8f3ffc81d927bba
Author: siqi <me at siqi.fr>
Date: Fri Jul 5 21:33:24 2013 +0200
slideshow control pad
Change-Id: Ie82e10fcdfc495ac19a34be85249480540e88d1d
diff --git a/ios/iosremote/.DS_Store b/ios/iosremote/.DS_Store
new file mode 100644
index 0000000..9940e91
Binary files /dev/null and b/ios/iosremote/.DS_Store differ
diff --git a/ios/iosremote/iosremote.xcodeproj/project.pbxproj b/ios/iosremote/iosremote.xcodeproj/project.pbxproj
index 646c330..3f41f43 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 at 2x.png in Resources */,
57C6E409175E06E800E8BC5F /* Default-568h at 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 0000000..3c57b1f
Binary files /dev/null and b/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/ios/iosremote/iosremote/Communication/CommandInterpreter.m b/ios/iosremote/iosremote/Communication/CommandInterpreter.m
index 3bce86c..f66e624 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 908ed6b..2c57dc0 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 7c6a486..3675387 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;
- at property (nonatomic, strong) id connectionConnectedObserver;
- at property (nonatomic, strong) id connectionDisconnectedObserver;
@end
@@ -35,8 +33,6 @@
@synthesize transmitter = _transmitter;
@synthesize servers = _servers;
@synthesize delegate = _delegate;
- at synthesize connectionConnectedObserver = _connectionConnectedObserver;
- at 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 14dadee..6c81043 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 29c4a32..ab8a55f 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 at 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 at 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 0000000..89923c6
Binary files /dev/null and b/ios/iosremote/iosremote/impress.jpeg differ
diff --git a/ios/iosremote/iosremote/iosremote-Prefix.pch b/ios/iosremote/iosremote/iosremote-Prefix.pch
new file mode 100644
index 0000000..b60bc65
--- /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 0000000..63ad820
Binary files /dev/null and b/ios/iosremote/iosremote/pushed_next_button.png differ
diff --git a/ios/iosremote/iosremote/pushed_previous_button.png b/ios/iosremote/iosremote/pushed_previous_button.png
new file mode 100644
index 0000000..a6f90ca
Binary files /dev/null and b/ios/iosremote/iosremote/pushed_previous_button.png differ
diff --git a/ios/iosremote/iosremote/released_next_button.png b/ios/iosremote/iosremote/released_next_button.png
new file mode 100644
index 0000000..aa8b899
Binary files /dev/null and b/ios/iosremote/iosremote/released_next_button.png differ
diff --git a/ios/iosremote/iosremote/released_previous_button.png b/ios/iosremote/iosremote/released_previous_button.png
new file mode 100644
index 0000000..71e2618
Binary files /dev/null and b/ios/iosremote/iosremote/released_previous_button.png differ
diff --git a/ios/iosremote/iosremote/serverList_vc.m b/ios/iosremote/iosremote/serverList_vc.m
index b613566..141cadd 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;
+ at property (nonatomic, strong) id pinValidationObserver;
@property (nonatomic, strong) NSIndexPath *lastSpinningCellIndex;
@end
@@ -26,6 +27,7 @@
@synthesize comManager = _comManager;
@synthesize lastSpinningCellIndex = _lastSpinningCellIndex;
@synthesize slideShowPreviewStartObserver = _slideShowPreviewStartObserver;
+ at 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 b2daa4d..0b07cc4 100644
--- a/ios/iosremote/iosremote/slideShowPreviewTable_vc.h
+++ b/ios/iosremote/iosremote/slideShowPreviewTable_vc.h
@@ -8,6 +8,8 @@
#import <UIKit/UIKit.h>
- at interface slideShowPreviewTable_vc : UITableViewController
+ at interface slideShowPreviewTable_vc : UITableViewController <UITableViewDataSource, UITableViewDelegate>
+
+ at property (strong, nonatomic) IBOutlet UITableView *optionsTable;
@end
diff --git a/ios/iosremote/iosremote/slideShowPreviewTable_vc.m b/ios/iosremote/iosremote/slideShowPreviewTable_vc.m
index c10166a..0e3a5f6 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 ()
- at property (nonatomic, strong) UIButton * startButton;
-
+ at property (nonatomic, weak) UIButton * startButton;
+ at property (nonatomic, strong) NSArray * optionsArray;
+ at property (nonatomic, strong) CommunicationManager * comManager;
@end
@implementation slideShowPreviewTable_vc
@synthesize startButton = _startButton;
+ at synthesize optionsTable = _optionsTable;
+ at 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 0000000..654b1db
--- /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>
+
+ at interface slideShow_vc : UIViewController
+
+- (IBAction)nextSlideAction:(id)sender;
+- (IBAction)previousSlideAction:(id)sender;
+
+ at end
diff --git a/ios/iosremote/iosremote/slideShow_vc.m b/ios/iosremote/iosremote/slideShow_vc.m
new file mode 100644
index 0000000..9570704
--- /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"
+
+ at interface slideShow_vc ()
+
+ at property (nonatomic, strong) CommunicationManager *comManager;
+
+ at end
+
+ at implementation slideShow_vc
+
+ at 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];
+}
+ at end
More information about the Libreoffice-commits
mailing list