diff options
Diffstat (limited to 'ios')
18 files changed, 44 insertions, 34 deletions
diff --git a/ios/iosremote/en.lproj/iPad_autosize.storyboard b/ios/iosremote/en.lproj/iPad_autosize.storyboard index da90368ad97a..04bc217f5215 100644 --- a/ios/iosremote/en.lproj/iPad_autosize.storyboard +++ b/ios/iosremote/en.lproj/iPad_autosize.storyboard @@ -559,10 +559,10 @@ <autoresizingMask key="autoresizingMask"/> <subviews> <imageView userInteractionEnabled="NO" tag="1" contentMode="scaleToFill" image="Default.png" id="dn1-99-Dde"> - <rect key="frame" x="44" y="3.5" width="233" height="163"/> + <rect key="frame" x="44" y="7" width="233" height="163"/> </imageView> <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" text="1" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="b5V-aR-n9S"> - <rect key="frame" x="245" y="145" width="32" height="21"/> + <rect key="frame" x="245" y="149" width="32" height="21"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <color key="backgroundColor" white="0.80146555659999996" alpha="1" colorSpace="calibratedWhite"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> diff --git a/ios/iosremote/en.lproj/iPad_autosize_old.storyboard b/ios/iosremote/en.lproj/iPad_autosize_old.storyboard index da90368ad97a..04bc217f5215 100644 --- a/ios/iosremote/en.lproj/iPad_autosize_old.storyboard +++ b/ios/iosremote/en.lproj/iPad_autosize_old.storyboard @@ -559,10 +559,10 @@ <autoresizingMask key="autoresizingMask"/> <subviews> <imageView userInteractionEnabled="NO" tag="1" contentMode="scaleToFill" image="Default.png" id="dn1-99-Dde"> - <rect key="frame" x="44" y="3.5" width="233" height="163"/> + <rect key="frame" x="44" y="7" width="233" height="163"/> </imageView> <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" text="1" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="b5V-aR-n9S"> - <rect key="frame" x="245" y="145" width="32" height="21"/> + <rect key="frame" x="245" y="149" width="32" height="21"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <color key="backgroundColor" white="0.80146555659999996" alpha="1" colorSpace="calibratedWhite"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> diff --git a/ios/iosremote/fr.lproj/iPad_autosize.storyboard b/ios/iosremote/fr.lproj/iPad_autosize.storyboard index 75e0d8d811be..bb49389cbea0 100644 --- a/ios/iosremote/fr.lproj/iPad_autosize.storyboard +++ b/ios/iosremote/fr.lproj/iPad_autosize.storyboard @@ -559,10 +559,10 @@ <autoresizingMask key="autoresizingMask"/> <subviews> <imageView userInteractionEnabled="NO" tag="1" contentMode="scaleToFill" image="Default.png" id="dn1-99-Dde"> - <rect key="frame" x="44" y="3.5" width="233" height="163"/> + <rect key="frame" x="44" y="7" width="233" height="163"/> </imageView> <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" text="1" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="b5V-aR-n9S"> - <rect key="frame" x="245" y="145" width="32" height="21"/> + <rect key="frame" x="245" y="149" width="32" height="21"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <color key="backgroundColor" white="0.80146555659999996" alpha="1" colorSpace="calibratedWhite"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> diff --git a/ios/iosremote/fr.lproj/iPad_autosize_old.storyboard b/ios/iosremote/fr.lproj/iPad_autosize_old.storyboard index 75e0d8d811be..bb49389cbea0 100644 --- a/ios/iosremote/fr.lproj/iPad_autosize_old.storyboard +++ b/ios/iosremote/fr.lproj/iPad_autosize_old.storyboard @@ -559,10 +559,10 @@ <autoresizingMask key="autoresizingMask"/> <subviews> <imageView userInteractionEnabled="NO" tag="1" contentMode="scaleToFill" image="Default.png" id="dn1-99-Dde"> - <rect key="frame" x="44" y="3.5" width="233" height="163"/> + <rect key="frame" x="44" y="7" width="233" height="163"/> </imageView> <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" text="1" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="b5V-aR-n9S"> - <rect key="frame" x="245" y="145" width="32" height="21"/> + <rect key="frame" x="245" y="149" width="32" height="21"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <color key="backgroundColor" white="0.80146555659999996" alpha="1" colorSpace="calibratedWhite"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> diff --git a/ios/iosremote/iosremote/Classes/BasePresentationViewController.m b/ios/iosremote/iosremote/Classes/BasePresentationViewController.m index 04f68af56d55..806b792cbdcc 100644 --- a/ios/iosremote/iosremote/Classes/BasePresentationViewController.m +++ b/ios/iosremote/iosremote/Classes/BasePresentationViewController.m @@ -78,7 +78,7 @@ [cell.thumbnail setShadow]; [self.comManager.interpreter.slideShow getContentAtIndex:indexPath.row forView:cell]; - + cell.backgroundColor = [UIColor clearColor]; return cell; } @@ -293,7 +293,7 @@ self.horizontalTableView.rowHeight = kCellWidth; - self.horizontalTableView.backgroundColor = [UIColor colorWithRed:.674509804 green:.729411765 blue:.760784314 alpha:1.0]; + self.horizontalTableView.backgroundColor = kHorizontalTableBackgroundColor; self.horizontalTableView.separatorStyle = UITableViewCellSeparatorStyleNone; diff --git a/ios/iosremote/iosremote/Classes/ControlVariables.h b/ios/iosremote/iosremote/Classes/ControlVariables.h index 3db19f6bebc5..97f8da9cdf72 100644 --- a/ios/iosremote/iosremote/Classes/ControlVariables.h +++ b/ios/iosremote/iosremote/Classes/ControlVariables.h @@ -6,6 +6,8 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. + +// This is the global configuration file that is included automatically #ifndef iosremote_ControlVariables_h #define iosremote_ControlVariables_h @@ -29,11 +31,11 @@ // Horizontal padding for the embedded table view within the row #define kRowHorizontalPadding 1 -// Background color for the horizontal table view (the one embedded inside the rows of our vertical table) -#define kHorizontalTableBackgroundColor [UIColor blackColor] +// Background color for the horizontal table view (the one embedded beneath the slideshow previews) +#define kHorizontalTableBackgroundColor [UIColor colorWithRed:.674509804 green:.729411765 blue:.760784314 alpha:1.0] // The background color on the horizontal table view for when we select a particular cell -#define kHorizontalTableSelectedBackgroundColor [UIColor colorWithRed:0.0 green:0.59607843 blue:0.37254902 alpha:1.0] +#define kHorizontalTableSelectedBackgroundColor [UIColor lightGrayColor] #define kHorizontalTableCellHighlightedBackgroundColor [UIColor colorWithRed:0 green:0.4745098 blue:0.29019808 alpha:0.9] diff --git a/ios/iosremote/iosremote/Classes/HorizontalSlideCell.h b/ios/iosremote/iosremote/Classes/HorizontalSlideCell.h index 4a88fe79d117..e7328559e980 100644 --- a/ios/iosremote/iosremote/Classes/HorizontalSlideCell.h +++ b/ios/iosremote/iosremote/Classes/HorizontalSlideCell.h @@ -8,6 +8,7 @@ #import <UIKit/UIKit.h> +// Horizontal cell used in the horizontal swipe list on iPad @interface HorizontalSlideCell : UITableViewCell @property (strong, nonatomic) UIImageView *thumbnail; diff --git a/ios/iosremote/iosremote/Classes/NewServerViewController.h b/ios/iosremote/iosremote/Classes/NewServerViewController.h index b9e55961621f..33163d949903 100644 --- a/ios/iosremote/iosremote/Classes/NewServerViewController.h +++ b/ios/iosremote/iosremote/Classes/NewServerViewController.h @@ -12,21 +12,18 @@ @class EditableTableViewCell; @class CommunicationManager; -// Constants representing the book's fields. -// enum { ServerAddr, ServerName }; -// Constants representing the various sections of our grouped table view. -// enum { InformationSection }; typedef NSUInteger ServerAttribute; +// View controller used to add new server @interface NewServerViewController : UITableViewController <UITextFieldDelegate> @property (nonatomic, strong) Server *server; @property (nonatomic, strong) EditableTableViewCell *nameCell; diff --git a/ios/iosremote/iosremote/Classes/SlideShowPreviewViewController.h b/ios/iosremote/iosremote/Classes/SlideShowPreviewViewController.h index 9d498c0043c5..63928e4a6464 100644 --- a/ios/iosremote/iosremote/Classes/SlideShowPreviewViewController.h +++ b/ios/iosremote/iosremote/Classes/SlideShowPreviewViewController.h @@ -9,10 +9,7 @@ #import <UIKit/UIKit.h> #import "CommunicationManager.h" -#define OPTION_TIMER NSLocalizedString(@"Timer auto-start", nil) -#define OPTION_POINTER NSLocalizedString(@"Touch pointer", nil) -#define STOPWATCH_AUTO_START @"STOPWATCH_AUTO_START" - +// Once connected, users will be directed to this page. If the slideshow is not running yet, users may change the preferences and start the presentation. Otherwise, users will be directly taken to the presentation view controller. @interface SlideShowPreviewViewController : UIViewController @property (nonatomic, strong) CommunicationManager * comManager; diff --git a/ios/iosremote/iosremote/Classes/SlideShowSwipeInList~ipad.m b/ios/iosremote/iosremote/Classes/SlideShowSwipeInList~ipad.m index 06f18c15da05..1553f5ecbf59 100644 --- a/ios/iosremote/iosremote/Classes/SlideShowSwipeInList~ipad.m +++ b/ios/iosremote/iosremote/Classes/SlideShowSwipeInList~ipad.m @@ -70,7 +70,7 @@ dispatch_queue_t backgroundQueue; [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionMiddle animated:YES]; } }]; - self.tableView.backgroundColor = [UIColor colorWithRed:.674509804 green:.729411765 blue:.760784314 alpha:1.0]; + self.tableView.backgroundColor = kHorizontalTableBackgroundColor; } - (void)viewDidUnload @@ -133,6 +133,7 @@ dispatch_queue_t backgroundQueue; [cell setTag:20+indexPath.row]; [self.slideshow getContentAtIndex:indexPath.row forView:cell]; [slideNumber setText:[NSString stringWithFormat:@"%u", indexPath.row+1]]; + cell.backgroundColor = [UIColor clearColor]; return cell; } @@ -140,9 +141,7 @@ dispatch_queue_t backgroundQueue; // Otherwise selection will disable background color and make slide number unreadable if(cell.selected){ UILabel *label = (UILabel *)[cell viewWithTag:2]; - if ([label backgroundColor]!=[UIColor lightGrayColor]) { - [label setBackgroundColor:[UIColor lightGrayColor]]; - } + [label setBackgroundColor:[UIColor lightGrayColor]]; } } diff --git a/ios/iosremote/iosremote/Classes/Timer.h b/ios/iosremote/iosremote/Classes/Timer.h index 8e3e6a673d30..537dbcaf33a9 100644 --- a/ios/iosremote/iosremote/Classes/Timer.h +++ b/ios/iosremote/iosremote/Classes/Timer.h @@ -38,8 +38,9 @@ - (void) start; - (void) clear; +// Keep start/pause/clear button up to date - (void) updateStartButtonIcon; - +// set the seconds left property - (void) setSecondsLeft:(NSTimeInterval)duration; @end diff --git a/ios/iosremote/iosremote/Communication/CommandInterpreter.h b/ios/iosremote/iosremote/Communication/CommandInterpreter.h index 806e91226b03..a1a2b4ae6959 100644 --- a/ios/iosremote/iosremote/Communication/CommandInterpreter.h +++ b/ios/iosremote/iosremote/Communication/CommandInterpreter.h @@ -11,6 +11,7 @@ @class SlideShow; +// Interprete server-remote messages @interface CommandInterpreter : NSObject @property (atomic, strong) SlideShow* slideShow; diff --git a/ios/iosremote/iosremote/Communication/CommunicationManager.h b/ios/iosremote/iosremote/Communication/CommunicationManager.h index 20a89d9adbd1..5c79cd0132da 100644 --- a/ios/iosremote/iosremote/Communication/CommunicationManager.h +++ b/ios/iosremote/iosremote/Communication/CommunicationManager.h @@ -62,7 +62,7 @@ enum ConnectionState : NSInteger { CONNECTED }; -// +// Used in serverlist view controller. When searching, display an activity indicator and relative text in the searching tablecell enum SearchState : NSInteger { WAITING, SEARCHING @@ -70,17 +70,23 @@ enum SearchState : NSInteger { @interface CommunicationManager : NSObject +// load previously added servers - (id) initWithExistingServers; +// load previously generated pin code or generate a new one - (NSNumber *) getPairingPin; +// connect the client to its server - (void) connectToServer:(Server*)server; +// add a new server and preserve it in the userdefaults. Servers are bundled with comManager - (void) addServersWithName:(NSString*)name AtAddress:(NSString*)addr; - (void) removeServerAtIndex:(NSUInteger)index; +// acquire currently connected WiFi's SSID + (id)fetchSSIDInfo; @property ConnectionState state; @property SearchState searchState; +// Used to display connection error message. Create protocol or take precautions like respondToSelector before calling on delegate's method @property (nonatomic, strong) id delegate; @property (atomic, strong) NSMutableArray* servers; @property (atomic, strong) NSMutableArray* autoDiscoveryServers; diff --git a/ios/iosremote/iosremote/Communication/SlideShow.h b/ios/iosremote/iosremote/Communication/SlideShow.h index af5a56162558..c1c508cd2de5 100644 --- a/ios/iosremote/iosremote/Communication/SlideShow.h +++ b/ios/iosremote/iosremote/Communication/SlideShow.h @@ -18,19 +18,25 @@ @class slideShowPreview_vc; +// Container for slideshow contents like images/notes +// Support asyncloadDelegate methods. @interface SlideShow : NSObject @property uint size; @property uint currentSlide; //@property (nonatomic, strong) NSString * title; @property (nonatomic, strong) id <AsyncLoadHorizontalTableDelegate> delegate; +// Used for loading preview for next slide in the smaller UIImageView @property (nonatomic, strong) id secondaryDelegate; +// When an image is received, we put it into the correct index - (void) putImage: (NSString *)img AtIndex: (uint) index; +// When an note is received, we put it into the correct index - (void) putNotes: (NSString *)notes AtIndex: (uint) index; +// Register an entry in the loadBuffer which loads the content (image or notes) directly into the desired UI element or wait until received the desired content from the server - (void) getContentAtIndex: (uint) index forView: (UIView*) view; - +// Store the filename of the slideshow - (NSString *) title; - (void) setTitle:(NSString *)title; diff --git a/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard b/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard index 8e031e83a7eb..d85e37a42e03 100644 --- a/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard +++ b/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard @@ -445,7 +445,7 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> <subviews> <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" verticalCompressionResistancePriority="1000" id="bZq-z2-OKU"> - <rect key="frame" x="3.0000000000000031" y="8" width="220" height="167"/> + <rect key="frame" x="3" y="8" width="220" height="167"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> </imageView> diff --git a/ios/iosremote/iosremote/en.lproj/iPhone_autoSize_old.storyboard b/ios/iosremote/iosremote/en.lproj/iPhone_autoSize_old.storyboard index 8e031e83a7eb..d85e37a42e03 100644 --- a/ios/iosremote/iosremote/en.lproj/iPhone_autoSize_old.storyboard +++ b/ios/iosremote/iosremote/en.lproj/iPhone_autoSize_old.storyboard @@ -445,7 +445,7 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> <subviews> <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" verticalCompressionResistancePriority="1000" id="bZq-z2-OKU"> - <rect key="frame" x="3.0000000000000031" y="8" width="220" height="167"/> + <rect key="frame" x="3" y="8" width="220" height="167"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> </imageView> diff --git a/ios/iosremote/zh-Hans.lproj/iPad_autosize.storyboard b/ios/iosremote/zh-Hans.lproj/iPad_autosize.storyboard index 6b805acff91a..c9bfbbf3625f 100644 --- a/ios/iosremote/zh-Hans.lproj/iPad_autosize.storyboard +++ b/ios/iosremote/zh-Hans.lproj/iPad_autosize.storyboard @@ -559,10 +559,10 @@ <autoresizingMask key="autoresizingMask"/> <subviews> <imageView userInteractionEnabled="NO" tag="1" contentMode="scaleToFill" image="Default.png" id="dn1-99-Dde"> - <rect key="frame" x="44" y="3.5" width="233" height="163"/> + <rect key="frame" x="44" y="7" width="233" height="163"/> </imageView> <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" text="1" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="b5V-aR-n9S"> - <rect key="frame" x="245" y="145" width="32" height="21"/> + <rect key="frame" x="245" y="149" width="32" height="21"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <color key="backgroundColor" white="0.80146555659999996" alpha="1" colorSpace="calibratedWhite"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> diff --git a/ios/iosremote/zh-Hans.lproj/iPad_autosize_old.storyboard b/ios/iosremote/zh-Hans.lproj/iPad_autosize_old.storyboard index 6b805acff91a..c9bfbbf3625f 100644 --- a/ios/iosremote/zh-Hans.lproj/iPad_autosize_old.storyboard +++ b/ios/iosremote/zh-Hans.lproj/iPad_autosize_old.storyboard @@ -559,10 +559,10 @@ <autoresizingMask key="autoresizingMask"/> <subviews> <imageView userInteractionEnabled="NO" tag="1" contentMode="scaleToFill" image="Default.png" id="dn1-99-Dde"> - <rect key="frame" x="44" y="3.5" width="233" height="163"/> + <rect key="frame" x="44" y="7" width="233" height="163"/> </imageView> <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" text="1" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="b5V-aR-n9S"> - <rect key="frame" x="245" y="145" width="32" height="21"/> + <rect key="frame" x="245" y="149" width="32" height="21"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <color key="backgroundColor" white="0.80146555659999996" alpha="1" colorSpace="calibratedWhite"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> |