summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiqi LIU <me@siqi.fr>2013-08-07 12:37:21 +0800
committerSiqi LIU <me@siqi.fr>2013-08-07 12:38:03 +0800
commit2a5d3cbebc182f02773b7704a99dbf63bd10f5a5 (patch)
tree5f3e79c51b51767ad76e8c4edda2187f0dde6b7e
parent89aeec9b1d2f771310eeb0fa4c820c19599df0f7 (diff)
design style revamped for iOS7
Change-Id: I469e50e779ac201ab15aa8fff8e2f6fcfb2f99b6
-rw-r--r--ios/.DS_Storebin0 -> 15364 bytes
-rw-r--r--ios/iosremote/.DS_Storebin0 -> 15364 bytes
-rwxr-xr-xios/iosremote/PopoverView.h202
-rwxr-xr-xios/iosremote/PopoverView.m1049
-rwxr-xr-xios/iosremote/PopoverViewCompatibility.h23
-rwxr-xr-xios/iosremote/PopoverView_Configuration.h112
-rw-r--r--ios/iosremote/TestFlightSDK1.2.6/.DS_Storebin0 -> 6148 bytes
-rw-r--r--ios/iosremote/UIBarButtonItem+Theme.h16
-rw-r--r--ios/iosremote/UIBarButtonItem+Theme.m48
-rw-r--r--ios/iosremote/UINavigationController+Theme.h15
-rw-r--r--ios/iosremote/UINavigationController+Theme.m23
-rw-r--r--ios/iosremote/iPad_autosize.storyboard103
-rw-r--r--ios/iosremote/iosremote.xcodeproj/project.pbxproj94
-rw-r--r--ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/me.xcuserdatad/UserInterfaceState.xcuserstatebin0 -> 100228 bytes
-rw-r--r--ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/me.xcuserdatad/WorkspaceSettings.xcsettings10
-rw-r--r--ios/iosremote/iosremote.xcodeproj/xcuserdata/me.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist20
-rw-r--r--ios/iosremote/iosremote.xcodeproj/xcuserdata/me.xcuserdatad/xcschemes/iosremote.xcscheme86
-rw-r--r--ios/iosremote/iosremote.xcodeproj/xcuserdata/me.xcuserdatad/xcschemes/xcschememanagement.plist22
-rw-r--r--ios/iosremote/iosremote/.DS_Storebin21508 -> 21508 bytes
-rw-r--r--ios/iosremote/iosremote/AppDelegate.m17
-rw-r--r--ios/iosremote/iosremote/BasePresentationViewController.h3
-rw-r--r--ios/iosremote/iosremote/BasePresentationViewController.m48
-rw-r--r--ios/iosremote/iosremote/LibONavigationController.h13
-rw-r--r--ios/iosremote/iosremote/LibONavigationController.m44
-rw-r--r--ios/iosremote/iosremote/SWRevealViewController/navBarBackground@2x.pngbin0 -> 3553 bytes
-rw-r--r--ios/iosremote/iosremote/UIViewController+LibOStyling.h15
-rw-r--r--ios/iosremote/iosremote/UIViewController+LibOStyling.m35
-rw-r--r--ios/iosremote/iosremote/add.pngbin0 -> 25318 bytes
-rw-r--r--ios/iosremote/iosremote/add@2x.pngbin0 -> 2950 bytes
-rw-r--r--ios/iosremote/iosremote/autoDismissKeyboardNavigationViewController.h3
-rw-r--r--ios/iosremote/iosremote/backButton.pngbin0 -> 3093 bytes
-rw-r--r--ios/iosremote/iosremote/backButton@2x.pngbin0 -> 3482 bytes
-rw-r--r--ios/iosremote/iosremote/en.lproj/.DS_Storebin0 -> 6148 bytes
-rw-r--r--ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard28
-rw-r--r--ios/iosremote/iosremote/gear.pngbin0 -> 3545 bytes
-rw-r--r--ios/iosremote/iosremote/gear@2x.pngbin0 -> 4689 bytes
-rw-r--r--ios/iosremote/iosremote/gear_pressed.pngbin0 -> 3459 bytes
-rw-r--r--ios/iosremote/iosremote/gear_pressed@2x.pngbin0 -> 4409 bytes
-rw-r--r--ios/iosremote/iosremote/gear_transparent_bg.pngbin0 -> 3250 bytes
-rw-r--r--ios/iosremote/iosremote/gear_transparent_bg@2x.pngbin0 -> 3749 bytes
-rw-r--r--ios/iosremote/iosremote/iosremote-Info.plist2
-rw-r--r--ios/iosremote/iosremote/more_icon.pngbin2906 -> 3105 bytes
-rw-r--r--ios/iosremote/iosremote/more_icon@2x.pngbin0 -> 3142 bytes
-rw-r--r--ios/iosremote/iosremote/navBarButtonNormal@2x.pngbin0 -> 2843 bytes
-rw-r--r--ios/iosremote/iosremote/newServer_vc.h3
-rw-r--r--ios/iosremote/iosremote/newServer_vc.m19
-rw-r--r--ios/iosremote/iosremote/serverList_vc.m4
-rw-r--r--ios/iosremote/iosremote/slideShowPreviewTable_vc_ipad.m5
-rw-r--r--ios/iosremote/iosremote/slideShowPreviewTable_vc_iphone.m4
-rw-r--r--ios/iosremote/iosremote/slideShowSwipeInList_ipad.m7
-rw-r--r--ios/iosremote/iosremote/slideShow_vc_iphone.m49
-rw-r--r--ios/iosremote/iosremote_ipad_icon.pngbin8180 -> 6105 bytes
-rw-r--r--ios/iosremote/iosremote_ipad_icon@2x.pngbin6657 -> 6857 bytes
-rw-r--r--ios/iosremote/iosremote_iphone_icon.pngbin7206 -> 5552 bytes
-rw-r--r--ios/iosremote/iosremote_iphone_icon@2x.pngbin10861 -> 8878 bytes
-rw-r--r--ios/iosremote/navBarBackground.pngbin0 -> 2933 bytes
-rw-r--r--ios/iosremote/navBarBackground@2x.pngbin0 -> 3488 bytes
57 files changed, 2087 insertions, 35 deletions
diff --git a/ios/.DS_Store b/ios/.DS_Store
new file mode 100644
index 000000000000..6ebde5e66f1f
--- /dev/null
+++ b/ios/.DS_Store
Binary files differ
diff --git a/ios/iosremote/.DS_Store b/ios/iosremote/.DS_Store
new file mode 100644
index 000000000000..bff21b7fe746
--- /dev/null
+++ b/ios/iosremote/.DS_Store
Binary files differ
diff --git a/ios/iosremote/PopoverView.h b/ios/iosremote/PopoverView.h
new file mode 100755
index 000000000000..a945e38e01a2
--- /dev/null
+++ b/ios/iosremote/PopoverView.h
@@ -0,0 +1,202 @@
+//
+// PopoverView.h
+// Embark
+//
+// Created by Oliver Rickard on 20/08/2012.
+//
+//
+
+#import <UIKit/UIKit.h>
+#import "PopoverViewCompatibility.h"
+
+
+/**************** Support both ARC and non-ARC ********************/
+
+#ifndef SUPPORT_ARC
+#define SUPPORT_ARC
+
+#if __has_feature(objc_arc_weak) //objc_arc_weak
+#define WEAK weak
+#define __WEAK __weak
+#define STRONG strong
+
+#define AUTORELEASE self
+#define RELEASE self
+#define RETAIN self
+#define CFTYPECAST(exp) (__bridge exp)
+#define TYPECAST(exp) (__bridge_transfer exp)
+#define CFRELEASE(exp) CFRelease(exp)
+#define DEALLOC self
+
+#elif __has_feature(objc_arc) //objc_arc
+#define WEAK unsafe_unretained
+#define __WEAK __unsafe_unretained
+#define STRONG strong
+
+#define AUTORELEASE self
+#define RELEASE self
+#define RETAIN self
+#define CFTYPECAST(exp) (__bridge exp)
+#define TYPECAST(exp) (__bridge_transfer exp)
+#define CFRELEASE(exp) CFRelease(exp)
+#define DEALLOC self
+
+#else //none
+#define WEAK assign
+#define __WEAK
+#define STRONG retain
+
+#define AUTORELEASE autorelease
+#define RELEASE release
+#define RETAIN retain
+#define CFTYPECAST(exp) (exp)
+#define TYPECAST(exp) (exp)
+#define CFRELEASE(exp) CFRelease(exp)
+#define DEALLOC dealloc
+
+#endif
+#endif
+
+/******************************************************************/
+
+
+@class PopoverView;
+
+@protocol PopoverViewDelegate <NSObject>
+
+@optional
+
+//Delegate receives this call as soon as the item has been selected
+- (void)popoverView:(PopoverView *)popoverView didSelectItemAtIndex:(NSInteger)index;
+
+//Delegate receives this call once the popover has begun the dismissal animation
+- (void)popoverViewDidDismiss:(PopoverView *)popoverView;
+
+@end
+
+@interface PopoverView : UIView {
+ CGRect boxFrame;
+ CGSize contentSize;
+ CGPoint arrowPoint;
+
+ BOOL above;
+
+ __WEAK id<PopoverViewDelegate> delegate;
+
+ UIView *parentView;
+
+ UIView *topView;
+
+ NSArray *subviewsArray;
+
+ NSArray *dividerRects;
+
+ UIView *contentView;
+
+ UIView *titleView;
+
+ UIActivityIndicatorView *activityIndicator;
+
+ //Instance variable that can change at runtime
+ BOOL showDividerRects;
+}
+
+@property (nonatomic, STRONG) UIView *titleView;
+
+@property (nonatomic, STRONG) UIView *contentView;
+
+@property (nonatomic, STRONG) NSArray *subviewsArray;
+
+@property (nonatomic, WEAK) id<PopoverViewDelegate> delegate;
+
+#pragma mark - Class Static Showing Methods
+
+//These are the main static methods you can use to display the popover.
+//Simply call [PopoverView show...] with your arguments, and the popover will be generated, added to the view stack, and notify you when it's done.
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withText:(NSString *)text delegate:(id<PopoverViewDelegate>)delegate;
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withText:(NSString *)text delegate:(id<PopoverViewDelegate>)delegate;
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withViewArray:(NSArray *)viewArray delegate:(id<PopoverViewDelegate>)delegate;
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withViewArray:(NSArray *)viewArray delegate:(id<PopoverViewDelegate>)delegate;
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withStringArray:(NSArray *)stringArray delegate:(id<PopoverViewDelegate>)delegate;
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withStringArray:(NSArray *)stringArray delegate:(id<PopoverViewDelegate>)delegate;
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withStringArray:(NSArray *)stringArray withImageArray:(NSArray *)imageArray delegate:(id<PopoverViewDelegate>)delegate;
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withStringArray:(NSArray *)stringArray withImageArray:(NSArray *)imageArray delegate:(id<PopoverViewDelegate>)delegate;
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withContentView:(UIView *)cView delegate:(id<PopoverViewDelegate>)delegate;
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withContentView:(UIView *)cView delegate:(id<PopoverViewDelegate>)delegate;
+
+#pragma mark - Instance Showing Methods
+
+//Adds/animates in the popover to the top of the view stack with the arrow pointing at the "point"
+//within the specified view. The contentView will be added to the popover, and should have either
+//a clear color backgroundColor, or perhaps a rounded corner bg rect (radius 4.f if you're going to
+//round).
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withContentView:(UIView *)contentView;
+
+//Calls above method with a UILabel containing the text you deliver to this method.
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withText:(NSString *)text;
+
+//Calls top method with an array of UIView objects. This method will stack these views vertically
+//with kBoxPadding padding between each view in the y-direction.
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withViewArray:(NSArray *)viewArray;
+
+//Does same as above, but adds a title label at top of the popover.
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withViewArray:(NSArray *)viewArray;
+
+//Calls the viewArray method with an array of UILabels created with the strings
+//in stringArray. All contents of stringArray must be NSStrings.
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withStringArray:(NSArray *)stringArray;
+
+//This method does same as above, but with a title label at the top of the popover.
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withStringArray:(NSArray *)stringArray;
+
+//Draws a vertical list of the NSString elements of stringArray with UIImages
+//from imageArray placed centered above them.
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withStringArray:(NSArray *)stringArray withImageArray:(NSArray *)imageArray;
+
+//Does the same as above, but with a title
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withStringArray:(NSArray *)stringArray withImageArray:(NSArray *)imageArray;
+
+//Lays out the PopoverView at a point once all of the views have already been setup elsewhere
+- (void)layoutAtPoint:(CGPoint)point inView:(UIView *)view;
+
+#pragma mark - Other Interaction
+//This method animates the rotation of the PopoverView to a new point
+- (void)animateRotationToNewPoint:(CGPoint)point inView:(UIView *)view withDuration:(NSTimeInterval)duration;
+
+#pragma mark - Dismissal
+//Dismisses the view, and removes it from the view stack.
+- (void)dismiss;
+- (void)dismiss:(BOOL)animated;
+
+#pragma mark - Activity Indicator Methods
+
+//Shows the activity indicator, and changes the title (if the title is available, and is a UILabel).
+- (void)showActivityIndicatorWithMessage:(NSString *)msg;
+
+//Hides the activity indicator, and changes the title (if the title is available) to the msg
+- (void)hideActivityIndicatorWithMessage:(NSString *)msg;
+
+#pragma mark - Custom Image Showing
+
+//Animate in, and display the image provided here.
+- (void)showImage:(UIImage *)image withMessage:(NSString *)msg;
+
+#pragma mark - Error/Success Methods
+
+//Shows (and animates in) an error X in the contentView
+- (void)showError;
+
+//Shows (and animates in) a success checkmark in the contentView
+- (void)showSuccess;
+
+@end
diff --git a/ios/iosremote/PopoverView.m b/ios/iosremote/PopoverView.m
new file mode 100755
index 000000000000..1bf43b566a11
--- /dev/null
+++ b/ios/iosremote/PopoverView.m
@@ -0,0 +1,1049 @@
+//
+// PopoverView.m
+// Embark
+//
+// Created by Oliver Rickard on 20/08/2012.
+//
+//
+
+#import "PopoverView.h"
+#import "PopoverView_Configuration.h"
+#import <QuartzCore/QuartzCore.h>
+
+#pragma mark - Implementation
+
+@implementation PopoverView
+
+@synthesize subviewsArray;
+@synthesize contentView;
+@synthesize titleView;
+@synthesize delegate;
+
+#pragma mark - Static Methods
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withText:(NSString *)text delegate:(id<PopoverViewDelegate>)delegate {
+ PopoverView *popoverView = [[PopoverView alloc] initWithFrame:CGRectZero];
+ [popoverView showAtPoint:point inView:view withText:text];
+ popoverView.delegate = delegate;
+ [popoverView RELEASE];
+ return popoverView;
+}
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withText:(NSString *)text delegate:(id<PopoverViewDelegate>)delegate {
+ PopoverView *popoverView = [[PopoverView alloc] initWithFrame:CGRectZero];
+ [popoverView showAtPoint:point inView:view withTitle:title withText:text];
+ popoverView.delegate = delegate;
+ [popoverView RELEASE];
+ return popoverView;
+}
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withViewArray:(NSArray *)viewArray delegate:(id<PopoverViewDelegate>)delegate {
+ PopoverView *popoverView = [[PopoverView alloc] initWithFrame:CGRectZero];
+ [popoverView showAtPoint:point inView:view withViewArray:viewArray];
+ popoverView.delegate = delegate;
+ [popoverView RELEASE];
+ return popoverView;
+}
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withViewArray:(NSArray *)viewArray delegate:(id<PopoverViewDelegate>)delegate {
+ PopoverView *popoverView = [[PopoverView alloc] initWithFrame:CGRectZero];
+ [popoverView showAtPoint:point inView:view withTitle:title withViewArray:viewArray];
+ popoverView.delegate = delegate;
+ [popoverView RELEASE];
+ return popoverView;
+}
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withStringArray:(NSArray *)stringArray delegate:(id<PopoverViewDelegate>)delegate {
+ PopoverView *popoverView = [[PopoverView alloc] initWithFrame:CGRectZero];
+ [popoverView showAtPoint:point inView:view withStringArray:stringArray];
+ popoverView.delegate = delegate;
+ [popoverView RELEASE];
+ return popoverView;
+}
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withStringArray:(NSArray *)stringArray delegate:(id<PopoverViewDelegate>)delegate {
+ PopoverView *popoverView = [[PopoverView alloc] initWithFrame:CGRectZero];
+ [popoverView showAtPoint:point inView:view withTitle:title withStringArray:stringArray];
+ popoverView.delegate = delegate;
+ [popoverView RELEASE];
+ return popoverView;
+}
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withStringArray:(NSArray *)stringArray withImageArray:(NSArray *)imageArray delegate:(id<PopoverViewDelegate>)delegate {
+ PopoverView *popoverView = [[PopoverView alloc] initWithFrame:CGRectZero];
+ [popoverView showAtPoint:point inView:view withStringArray:stringArray withImageArray:imageArray];
+ popoverView.delegate = delegate;
+ [popoverView RELEASE];
+ return popoverView;
+}
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withStringArray:(NSArray *)stringArray withImageArray:(NSArray *)imageArray delegate:(id<PopoverViewDelegate>)delegate {
+ PopoverView *popoverView = [[PopoverView alloc] initWithFrame:CGRectZero];
+ [popoverView showAtPoint:point inView:view withTitle:title withStringArray:stringArray withImageArray:imageArray];
+ popoverView.delegate = delegate;
+ [popoverView RELEASE];
+ return popoverView;
+}
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withContentView:(UIView *)cView delegate:(id<PopoverViewDelegate>)delegate {
+ PopoverView *popoverView = [[PopoverView alloc] initWithFrame:CGRectZero];
+ [popoverView showAtPoint:point inView:view withTitle:title withContentView:cView];
+ popoverView.delegate = delegate;
+ [popoverView RELEASE];
+ return popoverView;
+}
+
++ (PopoverView *)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withContentView:(UIView *)cView delegate:(id<PopoverViewDelegate>)delegate {
+ PopoverView *popoverView = [[PopoverView alloc] initWithFrame:CGRectZero];
+ [popoverView showAtPoint:point inView:view withContentView:cView];
+ popoverView.delegate = delegate;
+ [popoverView RELEASE];
+ return popoverView;
+}
+
+#pragma mark - View Lifecycle
+
+- (id)initWithFrame:(CGRect)frame
+{
+ self = [super initWithFrame:frame];
+ if (self) {
+ // Initialization code
+
+ self.backgroundColor = [UIColor clearColor];
+
+ self.titleView = nil;
+ self.contentView = nil;
+
+ showDividerRects = kShowDividersBetweenViews;
+ }
+ return self;
+}
+
+- (void)dealloc
+{
+ self.subviewsArray = nil;
+
+ if (dividerRects) {
+ [dividerRects RELEASE];
+ dividerRects = nil;
+ }
+
+ self.contentView = nil;
+ self.titleView = nil;
+
+ [super DEALLOC];
+}
+
+
+
+#pragma mark - Display methods
+
+// get the screen size, adjusted for orientation and status bar display
+// see http://stackoverflow.com/questions/7905432/how-to-get-orientation-dependent-height-and-width-of-the-screen/7905540#7905540
+- (CGSize) screenSize
+{
+ UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
+ CGSize size = [UIScreen mainScreen].bounds.size;
+ UIApplication *application = [UIApplication sharedApplication];
+ if (UIInterfaceOrientationIsLandscape(orientation))
+ {
+ size = CGSizeMake(size.height, size.width);
+ }
+ if (application.statusBarHidden == NO)
+ {
+ size.height -= MIN(application.statusBarFrame.size.width, application.statusBarFrame.size.height);
+ }
+ return size;
+}
+
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withText:(NSString *)text
+{
+ UIFont *font = kTextFont;
+
+ CGSize screenSize = [self screenSize];
+ CGSize textSize = [text sizeWithFont:font constrainedToSize:CGSizeMake(screenSize.width - kHorizontalMargin*4.f, 1000.f) lineBreakMode:UILineBreakModeWordWrap];
+
+ UILabel *textView = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, textSize.width, textSize.height)];
+ textView.backgroundColor = [UIColor clearColor];
+ textView.userInteractionEnabled = NO;
+ [textView setNumberOfLines:0]; //This is so the label word wraps instead of cutting off the text
+ textView.font = font;
+ textView.textAlignment = kTextAlignment;
+ textView.textColor = kTextColor;
+ textView.text = text;
+
+ [self showAtPoint:point inView:view withViewArray:[NSArray arrayWithObject:[textView AUTORELEASE]]];
+}
+
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withText:(NSString *)text
+{
+ UIFont *font = kTextFont;
+
+ CGSize screenSize = [self screenSize];
+ CGSize textSize = [text sizeWithFont:font constrainedToSize:CGSizeMake(screenSize.width - kHorizontalMargin*4.f, 1000.f) lineBreakMode:UILineBreakModeWordWrap];
+
+ UILabel *textView = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, textSize.width, textSize.height)];
+ textView.backgroundColor = [UIColor clearColor];
+ textView.userInteractionEnabled = NO;
+ [textView setNumberOfLines:0]; //This is so the label word wraps instead of cutting off the text
+ textView.font = font;
+ textView.textAlignment = kTextAlignment;
+ textView.textColor = kTextColor;
+ textView.text = text;
+
+ [self showAtPoint:point inView:view withTitle:title withViewArray:[NSArray arrayWithObject:[textView AUTORELEASE]]];
+}
+
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withViewArray:(NSArray *)viewArray
+{
+ UIView *container = [[UIView alloc] initWithFrame:CGRectZero];
+
+ float totalHeight = 0.f;
+ float totalWidth = 0.f;
+
+ int i = 0;
+
+ //Position each view the first time, and identify which view has the largest width that controls
+ //the sizing of the popover.
+ for (UIView *view in viewArray) {
+
+ view.frame = CGRectMake(0, totalHeight, view.frame.size.width, view.frame.size.height);
+ //Only add padding below the view if it's not the last item
+ float padding = (i == viewArray.count-1) ? 0 : kBoxPadding;
+
+ totalHeight += view.frame.size.height + padding;
+
+ if (view.frame.size.width > totalWidth) {
+ totalWidth = view.frame.size.width;
+ }
+
+ [container addSubview:view];
+
+ i++;
+ }
+
+ //If dividers are enabled, then we allocate the divider rect array. This will hold NSValues
+ if (kShowDividersBetweenViews) {
+ dividerRects = [[NSMutableArray alloc] initWithCapacity:viewArray.count-1];
+ }
+
+ container.frame = CGRectMake(0, 0, totalWidth, totalHeight);
+
+ i = 0;
+
+ totalHeight = 0;
+
+ //Now we actually change the frame element for each subview, and center the views horizontally.
+ for (UIView *view in viewArray) {
+ if ([view autoresizingMask] == UIViewAutoresizingFlexibleWidth) {
+ //Now make sure all flexible views are the full width
+ view.frame = CGRectMake(view.frame.origin.x, view.frame.origin.y, totalWidth, view.frame.size.height);
+ } else {
+ //If the view is not flexible width, then we position it centered in the view
+ //without stretching it.
+ view.frame = CGRectMake(floorf(CGRectGetMinX(boxFrame) + totalWidth*0.5f - view.frame.size.width*0.5f), view.frame.origin.y, view.frame.size.width, view.frame.size.height);
+ }
+
+ //and if dividers are enabled, we record their position for the drawing methods
+ if (kShowDividersBetweenViews && i != viewArray.count-1) {
+ CGRect dividerRect = CGRectMake(view.frame.origin.x, floorf(view.frame.origin.y + view.frame.size.height + kBoxPadding*0.5f), view.frame.size.width, 0.5f);
+
+ [((NSMutableArray *)dividerRects) addObject:[NSValue valueWithCGRect:dividerRect]];
+ }
+
+ //Only add padding below the view if it's not the last item
+ float padding = (i == viewArray.count-1) ? 0.f : kBoxPadding;
+
+ totalHeight += view.frame.size.height + padding;
+
+ i++;
+ }
+
+ self.subviewsArray = viewArray;
+
+ [self showAtPoint:point inView:view withContentView:[container AUTORELEASE]];
+}
+
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withViewArray:(NSArray *)viewArray
+{
+ UIView *container = [[UIView alloc] initWithFrame:CGRectZero];
+
+ //Create a label for the title text.
+ CGSize titleSize = [title sizeWithFont:kTitleFont];
+ UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0.f, 0.f, titleSize.width, titleSize.height)];
+ titleLabel.backgroundColor = [UIColor clearColor];
+ titleLabel.font = kTitleFont;
+ titleLabel.textAlignment = UITextAlignmentCenter;
+ titleLabel.textColor = kTitleColor;
+ titleLabel.text = title;
+
+ //Make sure that the title's label will have non-zero height. If it has zero height, then we don't allocate any space
+ //for it in the positioning of the views.
+ float titleHeightOffset = (titleSize.height > 0.f ? kBoxPadding : 0.f);
+
+ float totalHeight = titleSize.height + titleHeightOffset + kBoxPadding;
+ float totalWidth = titleSize.width;
+
+ int i = 0;
+
+ //Position each view the first time, and identify which view has the largest width that controls
+ //the sizing of the popover.
+ for (UIView *view in viewArray) {
+
+ view.frame = CGRectMake(0, totalHeight, view.frame.size.width, view.frame.size.height);
+
+ //Only add padding below the view if it's not the last item.
+ float padding = (i == viewArray.count-1) ? 0.f : kBoxPadding;
+
+ totalHeight += view.frame.size.height + padding;
+
+ if (view.frame.size.width > totalWidth) {
+ totalWidth = view.frame.size.width;
+ }
+
+ [container addSubview:view];
+
+ i++;
+ }
+
+ //If dividers are enabled, then we allocate the divider rect array. This will hold NSValues
+ if (kShowDividersBetweenViews) {
+ dividerRects = [[NSMutableArray alloc] initWithCapacity:viewArray.count-1];
+ }
+
+ i = 0;
+
+ for (UIView *view in viewArray) {
+ if ([view autoresizingMask] == UIViewAutoresizingFlexibleWidth) {
+ //Now make sure all flexible views are the full width
+ view.frame = CGRectMake(view.frame.origin.x, view.frame.origin.y, totalWidth, view.frame.size.height);
+ } else {
+ //If the view is not flexible width, then we position it centered in the view
+ //without stretching it.
+ view.frame = CGRectMake(floorf(CGRectGetMinX(boxFrame) + totalWidth*0.5f - view.frame.size.width*0.5f), view.frame.origin.y, view.frame.size.width, view.frame.size.height);
+ }
+
+ //and if dividers are enabled, we record their position for the drawing methods
+ if (kShowDividersBetweenViews && i != viewArray.count-1) {
+ CGRect dividerRect = CGRectMake(view.frame.origin.x, floorf(view.frame.origin.y + view.frame.size.height + kBoxPadding*0.5f), view.frame.size.width, 0.5f);
+
+ [((NSMutableArray *)dividerRects) addObject:[NSValue valueWithCGRect:dividerRect]];
+ }
+
+ i++;
+ }
+
+ titleLabel.frame = CGRectMake(floorf(totalWidth*0.5f - titleSize.width*0.5f), 0, titleSize.width, titleSize.height);
+
+ //Store the titleView as an instance variable if it is larger than 0 height (not an empty string)
+ if (titleSize.height > 0) {
+ self.titleView = titleLabel;
+ }
+
+ [container addSubview:[titleLabel AUTORELEASE]];
+
+ container.frame = CGRectMake(0, 0, totalWidth, totalHeight);
+
+ self.subviewsArray = viewArray;
+
+ [self showAtPoint:point inView:view withContentView:[container AUTORELEASE]];
+}
+
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withStringArray:(NSArray *)stringArray
+{
+ NSMutableArray *labelArray = [[NSMutableArray alloc] initWithCapacity:stringArray.count];
+
+ UIFont *font = kTextFont;
+
+ for (NSString *string in stringArray) {
+ CGSize textSize = [string sizeWithFont:font];
+ UIButton *textButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, textSize.width, textSize.height)];
+ textButton.backgroundColor = [UIColor clearColor];
+ textButton.titleLabel.font = font;
+ textButton.titleLabel.textAlignment = kTextAlignment;
+ textButton.titleLabel.textColor = kTextColor;
+ [textButton setTitle:string forState:UIControlStateNormal];
+ textButton.layer.cornerRadius = 4.f;
+ [textButton setTitleColor:kTextColor forState:UIControlStateNormal];
+ [textButton setTitleColor:kTextHighlightColor forState:UIControlStateHighlighted];
+ [textButton addTarget:self action:@selector(didTapButton:) forControlEvents:UIControlEventTouchUpInside];
+
+ [labelArray addObject:[textButton AUTORELEASE]];
+ }
+
+ [self showAtPoint:point inView:view withViewArray:[labelArray AUTORELEASE]];
+}
+
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withStringArray:(NSArray *)stringArray
+ {
+ NSMutableArray *labelArray = [[NSMutableArray alloc] initWithCapacity:stringArray.count];
+
+ UIFont *font = kTextFont;
+
+ for (NSString *string in stringArray) {
+ CGSize textSize = [string sizeWithFont:font];
+ UIButton *textButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, textSize.width, textSize.height)];
+ textButton.backgroundColor = [UIColor clearColor];
+ textButton.titleLabel.font = font;
+ textButton.titleLabel.textAlignment = kTextAlignment;
+ textButton.titleLabel.textColor = kTextColor;
+ [textButton setTitle:string forState:UIControlStateNormal];
+ textButton.layer.cornerRadius = 4.f;
+ [textButton setTitleColor:kTextColor forState:UIControlStateNormal];
+ [textButton setTitleColor:kTextHighlightColor forState:UIControlStateHighlighted];
+ [textButton addTarget:self action:@selector(didTapButton:) forControlEvents:UIControlEventTouchUpInside];
+
+ [labelArray addObject:[textButton AUTORELEASE]];
+ }
+
+ [self showAtPoint:point inView:view withTitle:title withViewArray:[labelArray AUTORELEASE]];
+}
+
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withStringArray:(NSArray *)stringArray withImageArray:(NSArray *)imageArray
+{
+ //Here we do something pretty similar to the stringArray method above.
+ //We create an array of subviews that contains the strings and images centered above a label.
+
+ NSAssert((stringArray.count == imageArray.count), @"stringArray.count should equal imageArray.count");
+ NSMutableArray* tempViewArray = [self makeTempViewsWithStrings:stringArray andImages:imageArray];
+
+ [self showAtPoint:point inView:view withViewArray:tempViewArray];
+}
+
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withStringArray:(NSArray *)stringArray withImageArray:(NSArray *)imageArray
+{
+ NSAssert((stringArray.count == imageArray.count), @"stringArray.count should equal imageArray.count");
+ NSMutableArray* tempViewArray = [self makeTempViewsWithStrings:stringArray andImages:imageArray];
+
+ [self showAtPoint:point inView:view withTitle:title withViewArray:tempViewArray];
+}
+
+- (NSMutableArray*) makeTempViewsWithStrings:(NSArray *)stringArray andImages:(NSArray *)imageArray
+{
+ NSMutableArray *tempViewArray = [[NSMutableArray alloc] initWithCapacity:stringArray.count];
+
+ UIFont *font = kTextFont;
+
+ for (int i = 0; i < stringArray.count; i++) {
+ NSString *string = [stringArray objectAtIndex:i];
+
+ //First we build a label for the text to set in.
+ CGSize textSize = [string sizeWithFont:font];
+ UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, textSize.width, textSize.height)];
+ label.backgroundColor = [UIColor clearColor];
+ label.font = font;
+ label.textAlignment = kTextAlignment;
+ label.textColor = kTextColor;
+ label.text = string;
+ label.layer.cornerRadius = 4.f;
+
+ //Now we grab the image at the same index in the imageArray, and create
+ //a UIImageView for it.
+ UIImage *image = [imageArray objectAtIndex:i];
+ UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
+
+ //Take the larger of the two widths as the width for the container
+ float containerWidth = MAX(imageView.frame.size.width, label.frame.size.width);
+ float containerHeight = label.frame.size.height + kImageTopPadding + kImageBottomPadding + imageView.frame.size.height;
+
+ //This container will hold both the image and the label
+ UIView *containerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, containerWidth, containerHeight)];
+
+ //Now we do the frame manipulations to put the imageView on top of the label, both centered
+ imageView.frame = CGRectMake(floorf(containerWidth*0.5f - imageView.frame.size.width*0.5f), kImageTopPadding, imageView.frame.size.width, imageView.frame.size.height);
+ label.frame = CGRectMake(floorf(containerWidth*0.5f - label.frame.size.width*0.5f), imageView.frame.size.height + kImageBottomPadding + kImageTopPadding, label.frame.size.width, label.frame.size.height);
+
+ [containerView addSubview:imageView];
+ [containerView addSubview:label];
+
+ [label RELEASE];
+ [imageView RELEASE];
+
+ [tempViewArray addObject:containerView];
+ [containerView RELEASE];
+ }
+
+ return [tempViewArray AUTORELEASE];
+}
+
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withTitle:(NSString *)title withContentView:(UIView *)cView
+{
+ [self showAtPoint:point inView:view withTitle:title withViewArray:[NSArray arrayWithObject:cView]];
+}
+
+- (void)showAtPoint:(CGPoint)point inView:(UIView *)view withContentView:(UIView *)cView {
+
+ //NSLog(@"point:%f,%f", point.x, point.y);
+
+ self.contentView = cView;
+ parentView = view;
+
+ // get the top view
+ // http://stackoverflow.com/questions/3843411/getting-reference-to-the-top-most-view-window-in-ios-application/8045804#8045804
+ topView = [[[[UIApplication sharedApplication] keyWindow] subviews] lastObject];
+
+ [self setupLayout:point inView:view];
+
+ // Make the view small and transparent before animation
+ self.alpha = 0.f;
+ self.transform = CGAffineTransformMakeScale(0.1f, 0.1f);
+
+ // animate into full size
+ // First stage animates to 1.05x normal size, then second stage animates back down to 1x size.
+ // This two-stage animation creates a little "pop" on open.
+ [UIView animateWithDuration:0.2f delay:0.f options:UIViewAnimationOptionCurveEaseInOut animations:^{
+ self.alpha = 1.f;
+ self.transform = CGAffineTransformMakeScale(1.05f, 1.05f);
+ } completion:^(BOOL finished) {
+ [UIView animateWithDuration:0.08f delay:0.f options:UIViewAnimationOptionCurveEaseInOut animations:^{
+ self.transform = CGAffineTransformIdentity;
+ } completion:nil];
+ }];
+}
+
+- (void)layoutAtPoint:(CGPoint)point inView:(UIView *)view
+{
+ // make transparent
+ self.alpha = 0.f;
+
+ [self setupLayout:point inView:view];
+
+ // animate back to full opacity
+ [UIView animateWithDuration:0.2f delay:0.f options:UIViewAnimationOptionCurveEaseInOut animations:^{
+ self.alpha = 1.f;
+ } completion:nil];
+}
+
+-(void)setupLayout:(CGPoint)point inView:(UIView*)view
+{
+ CGPoint topPoint = [topView convertPoint:point fromView:view];
+
+ arrowPoint = topPoint;
+
+ //NSLog(@"arrowPoint:%f,%f", arrowPoint.x, arrowPoint.y);
+
+ CGRect topViewBounds = topView.bounds;
+ //NSLog(@"topViewBounds %@", NSStringFromCGRect(topViewBounds));
+
+ float contentHeight = contentView.frame.size.height;
+ float contentWidth = contentView.frame.size.width;
+
+ float padding = kBoxPadding;
+
+ float boxHeight = contentHeight + 2.f*padding;
+ float boxWidth = contentWidth + 2.f*padding;
+
+ float xOrigin = 0.f;
+
+ //Make sure the arrow point is within the drawable bounds for the popover.
+ if (arrowPoint.x + kArrowHeight > topViewBounds.size.width - kHorizontalMargin - kBoxRadius - kArrowHorizontalPadding) {//Too far to the right
+ arrowPoint.x = topViewBounds.size.width - kHorizontalMargin - kBoxRadius - kArrowHorizontalPadding - kArrowHeight;
+ //NSLog(@"Correcting Arrow Point because it's too far to the right");
+ } else if (arrowPoint.x - kArrowHeight < kHorizontalMargin + kBoxRadius + kArrowHorizontalPadding) {//Too far to the left
+ arrowPoint.x = kHorizontalMargin + kArrowHeight + kBoxRadius + kArrowHorizontalPadding;
+ //NSLog(@"Correcting Arrow Point because it's too far to the left");
+ }
+
+ //NSLog(@"arrowPoint:%f,%f", arrowPoint.x, arrowPoint.y);
+
+ xOrigin = floorf(arrowPoint.x - boxWidth*0.5f);
+
+ //Check to see if the centered xOrigin value puts the box outside of the normal range.
+ if (xOrigin < CGRectGetMinX(topViewBounds) + kHorizontalMargin) {
+ xOrigin = CGRectGetMinX(topViewBounds) + kHorizontalMargin;
+ } else if (xOrigin + boxWidth > CGRectGetMaxX(topViewBounds) - kHorizontalMargin) {
+ //Check to see if the positioning puts the box out of the window towards the left
+ xOrigin = CGRectGetMaxX(topViewBounds) - kHorizontalMargin - boxWidth;
+ }
+
+ float arrowHeight = kArrowHeight;
+
+ float topPadding = kTopMargin;
+
+ above = YES;
+
+ if (topPoint.y - contentHeight - arrowHeight - topPadding < CGRectGetMinY(topViewBounds)) {
+ //Position below because it won't fit above.
+ above = NO;
+
+ boxFrame = CGRectMake(xOrigin, arrowPoint.y + arrowHeight, boxWidth, boxHeight);
+ } else {
+ //Position above.
+ above = YES;
+
+ boxFrame = CGRectMake(xOrigin, arrowPoint.y - arrowHeight - boxHeight, boxWidth, boxHeight);
+ }
+
+ //NSLog(@"boxFrame:(%f,%f,%f,%f)", boxFrame.origin.x, boxFrame.origin.y, boxFrame.size.width, boxFrame.size.height);
+
+ CGRect contentFrame = CGRectMake(boxFrame.origin.x + padding, boxFrame.origin.y + padding, contentWidth, contentHeight);
+ contentView.frame = contentFrame;
+
+ //We set the anchorPoint here so the popover will "grow" out of the arrowPoint specified by the user.
+ //You have to set the anchorPoint before setting the frame, because the anchorPoint property will
+ //implicitly set the frame for the view, which we do not want.
+ self.layer.anchorPoint = CGPointMake(arrowPoint.x / topViewBounds.size.width, arrowPoint.y / topViewBounds.size.height);
+ self.frame = topViewBounds;
+ [self setNeedsDisplay];
+
+ [self addSubview:contentView];
+ [topView addSubview:self];
+
+ //Add a tap gesture recognizer to the large invisible view (self), which will detect taps anywhere on the screen.
+ UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapped:)];
+ tap.cancelsTouchesInView = NO; // Allow touches through to a UITableView or other touchable view, as suggested by Dimajp.
+ [self addGestureRecognizer:tap];
+ [tap RELEASE];
+
+ self.userInteractionEnabled = YES;
+}
+
+
+#pragma mark - Activity Indicator
+
+//Animates in a progress indicator, and removes
+- (void)showActivityIndicatorWithMessage:(NSString *)msg
+{
+ if ([titleView isKindOfClass:[UILabel class]]) {
+ ((UILabel *)titleView).text = msg;
+ }
+
+ if (subviewsArray && (subviewsArray.count > 0)) {
+ [UIView animateWithDuration:0.2f animations:^{
+ for (UIView *view in subviewsArray) {
+ view.alpha = 0.f;
+ }
+ }];
+
+ if (showDividerRects) {
+ showDividerRects = NO;
+ [self setNeedsDisplay];
+ }
+ }
+
+ if (activityIndicator) {
+ [activityIndicator RELEASE];
+ [activityIndicator removeFromSuperview];
+ activityIndicator = nil;
+ }
+
+ activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
+ activityIndicator.frame = CGRectMake(CGRectGetMidX(contentView.bounds) - 10.f, CGRectGetMidY(contentView.bounds) - 10.f + 20.f, 20.f, 20.f);
+ [contentView addSubview:activityIndicator];
+
+ [activityIndicator startAnimating];
+}
+
+- (void)hideActivityIndicatorWithMessage:(NSString *)msg
+{
+ if ([titleView isKindOfClass:[UILabel class]]) {
+ ((UILabel *)titleView).text = msg;
+ }
+
+ [activityIndicator stopAnimating];
+ [UIView animateWithDuration:0.1f animations:^{
+ activityIndicator.alpha = 0.f;
+ } completion:^(BOOL finished) {
+ [activityIndicator RELEASE];
+ [activityIndicator removeFromSuperview];
+ activityIndicator = nil;
+ }];
+}
+
+- (void)showImage:(UIImage *)image withMessage:(NSString *)msg
+{
+ UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
+ imageView.alpha = 0.f;
+ imageView.frame = CGRectMake(floorf(CGRectGetMidX(contentView.bounds) - image.size.width*0.5f), floorf(CGRectGetMidY(contentView.bounds) - image.size.height*0.5f + ((self.titleView) ? 20 : 0.f)), image.size.width, image.size.height);
+ imageView.transform = CGAffineTransformMakeScale(0.1f, 0.1f);
+
+ [contentView addSubview:[imageView AUTORELEASE]];
+
+ if (subviewsArray && (subviewsArray.count > 0)) {
+ [UIView animateWithDuration:0.2f animations:^{
+ for (UIView *view in subviewsArray) {
+ view.alpha = 0.f;
+ }
+ }];
+
+ if (showDividerRects) {
+ showDividerRects = NO;
+ [self setNeedsDisplay];
+ }
+ }
+
+ if (msg) {
+ if ([titleView isKindOfClass:[UILabel class]]) {
+ ((UILabel *)titleView).text = msg;
+ }
+ }
+
+ [UIView animateWithDuration:0.2f delay:0.2f options:UIViewAnimationOptionCurveEaseOut animations:^{
+ imageView.alpha = 1.f;
+ imageView.transform = CGAffineTransformIdentity;
+ } completion:^(BOOL finished) {
+ //[imageView removeFromSuperview];
+ }];
+}
+
+- (void)showError
+{
+ UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"error"]];
+ imageView.alpha = 0.f;
+ imageView.frame = CGRectMake(CGRectGetMidX(contentView.bounds) - 20.f, CGRectGetMidY(contentView.bounds) - 20.f + ((self.titleView) ? 20 : 0.f), 40.f, 40.f);
+ imageView.transform = CGAffineTransformMakeScale(0.1f, 0.1f);
+
+ [contentView addSubview:[imageView AUTORELEASE]];
+
+ if (subviewsArray && (subviewsArray.count > 0)) {
+ [UIView animateWithDuration:0.1f animations:^{
+ for (UIView *view in subviewsArray) {
+ view.alpha = 0.f;
+ }
+ }];
+
+ if (showDividerRects) {
+ showDividerRects = NO;
+ [self setNeedsDisplay];
+ }
+ }
+
+ [UIView animateWithDuration:0.1f delay:0.1f options:UIViewAnimationOptionCurveEaseOut animations:^{
+ imageView.alpha = 1.f;
+ imageView.transform = CGAffineTransformIdentity;
+ } completion:^(BOOL finished) {
+ //[imageView removeFromSuperview];
+ }];
+
+}
+
+- (void)showSuccess
+{
+ UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"success"]];
+ imageView.alpha = 0.f;
+ imageView.frame = CGRectMake(CGRectGetMidX(contentView.bounds) - 20.f, CGRectGetMidY(contentView.bounds) - 20.f + ((self.titleView) ? 20 : 0.f), 40.f, 40.f);
+ imageView.transform = CGAffineTransformMakeScale(0.1f, 0.1f);
+
+ [contentView addSubview:[imageView AUTORELEASE]];
+
+ if (subviewsArray && (subviewsArray.count > 0)) {
+ [UIView animateWithDuration:0.1f animations:^{
+ for (UIView *view in subviewsArray) {
+ view.alpha = 0.f;
+ }
+ }];
+
+ if (showDividerRects) {
+ showDividerRects = NO;
+ [self setNeedsDisplay];
+ }
+ }
+
+ [UIView animateWithDuration:0.1f delay:0.1f options:UIViewAnimationOptionCurveEaseOut animations:^{
+ imageView.alpha = 1.f;
+ imageView.transform = CGAffineTransformIdentity;
+ } completion:^(BOOL finished) {
+ //[imageView removeFromSuperview];
+ }];
+
+}
+
+#pragma mark - User Interaction
+
+- (void)tapped:(UITapGestureRecognizer *)tap
+{
+ CGPoint point = [tap locationInView:contentView];
+
+ //NSLog(@"point:(%f,%f)", point.x, point.y);
+
+ BOOL found = NO;
+
+ //NSLog(@"subviewsArray:%@", subviewsArray);
+
+ for (int i = 0; i < subviewsArray.count && !found; i++) {
+ UIView *view = [subviewsArray objectAtIndex:i];
+
+ //NSLog(@"Rect:(%f,%f,%f,%f)", view.frame.origin.x, view.frame.origin.y, view.frame.size.width, view.frame.size.height);
+
+ if (CGRectContainsPoint(view.frame, point)) {
+ //The tap was within this view, so we notify the delegate, and break the loop.
+
+ found = YES;
+
+ //NSLog(@"Tapped subview:%d", i);
+
+ if ([view isKindOfClass:[UIButton class]]) {
+ return;
+ }
+
+ if (delegate && [delegate respondsToSelector:@selector(popoverView:didSelectItemAtIndex:)]) {
+ [delegate popoverView:self didSelectItemAtIndex:i];
+ }
+
+ break;
+ }
+ }
+
+ if (!found && CGRectContainsPoint(contentView.bounds, point)) {
+ found = YES;
+ //NSLog(@"popover box contains point, ignoring user input");
+ }
+
+ if (!found) {
+ [self dismiss:YES];
+ }
+
+}
+
+- (void)didTapButton:(UIButton *)sender
+{
+ int index = [subviewsArray indexOfObject:sender];
+
+ if (index == NSNotFound) {
+ return;
+ }
+
+ if (delegate && [delegate respondsToSelector:@selector(popoverView:didSelectItemAtIndex:)]) {
+ [delegate popoverView:self didSelectItemAtIndex:index];
+ }
+}
+
+- (void)dismiss
+{
+ [self dismiss:YES];
+}
+
+- (void)dismiss:(BOOL)animated
+{
+ if (!animated)
+ {
+ [self dismissComplete];
+ }
+ else
+ {
+ [UIView animateWithDuration:0.3f animations:^{
+ self.alpha = 0.1f;
+ self.transform = CGAffineTransformMakeScale(0.1f, 0.1f);
+ } completion:^(BOOL finished) {
+ [self dismissComplete];
+ }];
+ }
+}
+
+- (void)dismissComplete
+{
+ [self removeFromSuperview];
+
+ if (self.delegate && [self.delegate respondsToSelector:@selector(popoverViewDidDismiss:)]) {
+ [delegate popoverViewDidDismiss:self];
+ }
+}
+
+- (void)animateRotationToNewPoint:(CGPoint)point inView:(UIView *)view withDuration:(NSTimeInterval)duration
+{
+ [self layoutAtPoint:point inView:view];
+}
+
+#pragma mark - Drawing Routines
+
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect
+{
+ // Drawing code
+
+ // Build the popover path
+ CGRect frame = boxFrame;
+
+ float xMin = CGRectGetMinX(frame);
+ float yMin = CGRectGetMinY(frame);
+
+ float xMax = CGRectGetMaxX(frame);
+ float yMax = CGRectGetMaxY(frame);
+
+ float radius = kBoxRadius; //Radius of the curvature.
+
+ float cpOffset = kCPOffset; //Control Point Offset. Modifies how "curved" the corners are.
+
+
+ /*
+ LT2 RT1
+ LT1⌜⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⌝RT2
+ | |
+ | popover |
+ | |
+ LB2⌞_______________⌟RB1
+ LB1 RB2
+
+ Traverse rectangle in clockwise order, starting at LT1
+ L = Left
+ R = Right
+ T = Top
+ B = Bottom
+ 1,2 = order of traversal for any given corner
+
+ */
+
+ UIBezierPath *popoverPath = [UIBezierPath bezierPath];
+ [popoverPath moveToPoint:CGPointMake(CGRectGetMinX(frame), CGRectGetMinY(frame) + radius)];//LT1
+ [popoverPath addCurveToPoint:CGPointMake(xMin + radius, yMin) controlPoint1:CGPointMake(xMin, yMin + radius - cpOffset) controlPoint2:CGPointMake(xMin + radius - cpOffset, yMin)];//LT2
+
+ //If the popover is positioned below (!above) the arrowPoint, then we know that the arrow must be on the top of the popover.
+ //In this case, the arrow is located between LT2 and RT1
+ if (!above) {
+ [popoverPath addLineToPoint:CGPointMake(arrowPoint.x - kArrowHeight, yMin)];//left side
+ [popoverPath addCurveToPoint:arrowPoint controlPoint1:CGPointMake(arrowPoint.x - kArrowHeight + kArrowCurvature, yMin) controlPoint2:arrowPoint];//actual arrow point
+ [popoverPath addCurveToPoint:CGPointMake(arrowPoint.x + kArrowHeight, yMin) controlPoint1:arrowPoint controlPoint2:CGPointMake(arrowPoint.x + kArrowHeight - kArrowCurvature, yMin)];//right side
+ }
+
+ [popoverPath addLineToPoint:CGPointMake(xMax - radius, yMin)];//RT1
+ [popoverPath addCurveToPoint:CGPointMake(xMax, yMin + radius) controlPoint1:CGPointMake(xMax - radius + cpOffset, yMin) controlPoint2:CGPointMake(xMax, yMin + radius - cpOffset)];//RT2
+ [popoverPath addLineToPoint:CGPointMake(xMax, yMax - radius)];//RB1
+ [popoverPath addCurveToPoint:CGPointMake(xMax - radius, yMax) controlPoint1:CGPointMake(xMax, yMax - radius + cpOffset) controlPoint2:CGPointMake(xMax - radius + cpOffset, yMax)];//RB2
+
+ //If the popover is positioned above the arrowPoint, then we know that the arrow must be on the bottom of the popover.
+ //In this case, the arrow is located somewhere between LB1 and RB2
+ if (above) {
+ [popoverPath addLineToPoint:CGPointMake(arrowPoint.x + kArrowHeight, yMax)];//right side
+ [popoverPath addCurveToPoint:arrowPoint controlPoint1:CGPointMake(arrowPoint.x + kArrowHeight - kArrowCurvature, yMax) controlPoint2:arrowPoint];//arrow point
+ [popoverPath addCurveToPoint:CGPointMake(arrowPoint.x - kArrowHeight, yMax) controlPoint1:arrowPoint controlPoint2:CGPointMake(arrowPoint.x - kArrowHeight + kArrowCurvature, yMax)];
+ }
+
+ [popoverPath addLineToPoint:CGPointMake(xMin + radius, yMax)];//LB1
+ [popoverPath addCurveToPoint:CGPointMake(xMin, yMax - radius) controlPoint1:CGPointMake(xMin + radius - cpOffset, yMax) controlPoint2:CGPointMake(xMin, yMax - radius + cpOffset)];//LB2
+ [popoverPath closePath];
+
+ //// General Declarations
+ CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+ CGContextRef context = UIGraphicsGetCurrentContext();
+
+ //// Shadow Declarations
+ UIColor* shadow = [UIColor colorWithWhite:0.0f alpha:kShadowAlpha];
+ CGSize shadowOffset = CGSizeMake(0, 1);
+ CGFloat shadowBlurRadius = kShadowBlur;
+
+ //// Gradient Declarations
+ NSArray* gradientColors = [NSArray arrayWithObjects:
+ (id)kGradientTopColor.CGColor,
+ (id)kGradientBottomColor.CGColor, nil];
+ CGFloat gradientLocations[] = {0, 1};
+ CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, (CFTYPECAST(CFArrayRef)gradientColors), gradientLocations);
+
+
+ //These floats are the top and bottom offsets for the gradient drawing so the drawing includes the arrows.
+ float bottomOffset = (above ? kArrowHeight : 0.f);
+ float topOffset = (!above ? kArrowHeight : 0.f);
+
+ //Draw the actual gradient and shadow.
+ CGContextSaveGState(context);
+ CGContextSetShadowWithColor(context, shadowOffset, shadowBlurRadius, shadow.CGColor);
+ CGContextBeginTransparencyLayer(context, NULL);
+ [popoverPath addClip];
+ CGContextDrawLinearGradient(context, gradient, CGPointMake(CGRectGetMidX(frame), CGRectGetMinY(frame) - topOffset), CGPointMake(CGRectGetMidX(frame), CGRectGetMaxY(frame) + bottomOffset), 0);
+ CGContextEndTransparencyLayer(context);
+ CGContextRestoreGState(context);
+
+ //// Cleanup
+ CGGradientRelease(gradient);
+ CGColorSpaceRelease(colorSpace);
+
+
+ //Draw the title background
+ if (kDrawTitleGradient) {
+ //Calculate the height of the title bg
+ float titleBGHeight = -1;
+
+ //NSLog(@"titleView:%@", titleView);
+
+ if (titleView != nil) {
+ titleBGHeight = kBoxPadding*2.f + titleView.frame.size.height;
+ }
+
+
+ //Draw the title bg height, but only if we need to.
+ if (titleBGHeight > 0.f) {
+ CGPoint startingPoint = CGPointMake(xMin, yMin + titleBGHeight);
+ CGPoint endingPoint = CGPointMake(xMax, yMin + titleBGHeight);
+
+ UIBezierPath *titleBGPath = [UIBezierPath bezierPath];
+ [titleBGPath moveToPoint:startingPoint];
+ [titleBGPath addLineToPoint:CGPointMake(CGRectGetMinX(frame), CGRectGetMinY(frame) + radius)];//LT1
+ [titleBGPath addCurveToPoint:CGPointMake(xMin + radius, yMin) controlPoint1:CGPointMake(xMin, yMin + radius - cpOffset) controlPoint2:CGPointMake(xMin + radius - cpOffset, yMin)];//LT2
+
+ //If the popover is positioned below (!above) the arrowPoint, then we know that the arrow must be on the top of the popover.
+ //In this case, the arrow is located between LT2 and RT1
+ if (!above) {
+ [titleBGPath addLineToPoint:CGPointMake(arrowPoint.x - kArrowHeight, yMin)];//left side
+ [titleBGPath addCurveToPoint:arrowPoint controlPoint1:CGPointMake(arrowPoint.x - kArrowHeight + kArrowCurvature, yMin) controlPoint2:arrowPoint];//actual arrow point
+ [titleBGPath addCurveToPoint:CGPointMake(arrowPoint.x + kArrowHeight, yMin) controlPoint1:arrowPoint controlPoint2:CGPointMake(arrowPoint.x + kArrowHeight - kArrowCurvature, yMin)];//right side
+ }
+
+ [titleBGPath addLineToPoint:CGPointMake(xMax - radius, yMin)];//RT1
+ [titleBGPath addCurveToPoint:CGPointMake(xMax, yMin + radius) controlPoint1:CGPointMake(xMax - radius + cpOffset, yMin) controlPoint2:CGPointMake(xMax, yMin + radius - cpOffset)];//RT2
+ [titleBGPath addLineToPoint:endingPoint];
+ [titleBGPath addLineToPoint:startingPoint];
+ [titleBGPath closePath];
+
+ //// General Declarations
+ CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+ CGContextRef context = UIGraphicsGetCurrentContext();
+
+ //// Gradient Declarations
+ NSArray* gradientColors = [NSArray arrayWithObjects:
+ (id)kGradientTitleTopColor.CGColor,
+ (id)kGradientTitleBottomColor.CGColor, nil];
+ CGFloat gradientLocations[] = {0, 1};
+ CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, (CFTYPECAST(CFArrayRef)gradientColors), gradientLocations);
+
+
+ //These floats are the top and bottom offsets for the gradient drawing so the drawing includes the arrows.
+ float topOffset = (!above ? kArrowHeight : 0.f);
+
+ //Draw the actual gradient and shadow.
+ CGContextSaveGState(context);
+ CGContextBeginTransparencyLayer(context, NULL);
+ [titleBGPath addClip];
+ CGContextDrawLinearGradient(context, gradient, CGPointMake(CGRectGetMidX(frame), CGRectGetMinY(frame) - topOffset), CGPointMake(CGRectGetMidX(frame), CGRectGetMinY(frame) + titleBGHeight), 0);
+ CGContextEndTransparencyLayer(context);
+ CGContextRestoreGState(context);
+
+ UIBezierPath *dividerLine = [UIBezierPath bezierPathWithRect:CGRectMake(startingPoint.x, startingPoint.y, (endingPoint.x - startingPoint.x), 0.5f)];
+ [[UIColor colorWithRed:0.741 green:0.741 blue:0.741 alpha:0.5f] setFill];
+ [dividerLine fill];
+
+ //// Cleanup
+ CGGradientRelease(gradient);
+ CGColorSpaceRelease(colorSpace);
+ }
+ }
+
+
+
+ //Draw the divider rects if we need to
+ {
+ if (kShowDividersBetweenViews && showDividerRects) {
+ if (dividerRects && dividerRects.count > 0) {
+ for (NSValue *value in dividerRects) {
+ CGRect rect = value.CGRectValue;
+ rect.origin.x += contentView.frame.origin.x;
+ rect.origin.y += contentView.frame.origin.y;
+
+ UIBezierPath *dividerPath = [UIBezierPath bezierPathWithRect:rect];
+ [kDividerColor setFill];
+ [dividerPath fill];
+ }
+ }
+ }
+ }
+
+ //Draw border if we need to
+ //The border is done last because it needs to be drawn on top of everything else
+ if (kDrawBorder) {
+ [kBorderColor setStroke];
+ popoverPath.lineWidth = kBorderWidth;
+ [popoverPath stroke];
+ }
+
+}
+
+@end
diff --git a/ios/iosremote/PopoverViewCompatibility.h b/ios/iosremote/PopoverViewCompatibility.h
new file mode 100755
index 000000000000..f5ce1bbeaf62
--- /dev/null
+++ b/ios/iosremote/PopoverViewCompatibility.h
@@ -0,0 +1,23 @@
+//
+// PopoverViewCompatibility.h
+// popover
+//
+// Created by alanduncan on 7/22/13.
+// Copyright (c) 2013 Oliver Rickard. All rights reserved.
+//
+
+#ifndef popover_PopoverViewCompatibility_h
+#define popover_PopoverViewCompatibility_h
+
+#ifdef __IPHONE_6_0
+
+#define UITextAlignmentCenter NSTextAlignmentCenter
+#define UITextAlignmentLeft NSTextAlignmentLeft
+#define UITextAlignmentRight NSTextAlignmentRight
+#define UILineBreakModeTailTruncation NSLineBreakByTruncatingTail
+#define UILineBreakModeMiddleTruncation NSLineBreakByTruncatingMiddle
+#define UILineBreakModeWordWrap NSLineBreakByWordWrapping
+
+#endif
+
+#endif
diff --git a/ios/iosremote/PopoverView_Configuration.h b/ios/iosremote/PopoverView_Configuration.h
new file mode 100755
index 000000000000..f59ac941e241
--- /dev/null
+++ b/ios/iosremote/PopoverView_Configuration.h
@@ -0,0 +1,112 @@
+//
+// PopoverView_Configuration.h
+// popover
+//
+// Created by Bas Pellis on 12/25/12.
+// Copyright (c) 2012 Oliver Rickard. All rights reserved.
+//
+
+#pragma mark Constants - Configure look/feel
+
+// BOX GEOMETRY
+
+//Height/width of the actual arrow
+#define kArrowHeight 12.f
+
+//padding within the box for the contentView
+#define kBoxPadding 10.f
+
+//control point offset for rounding corners of the main popover box
+#define kCPOffset 1.8f
+
+//radius for the rounded corners of the main popover box
+#define kBoxRadius 4.f
+
+//Curvature value for the arrow. Set to 0.f to make it linear.
+#define kArrowCurvature 6.f
+
+//Minimum distance from the side of the arrow to the beginning of curvature for the box
+#define kArrowHorizontalPadding 5.f
+
+//Alpha value for the shadow behind the PopoverView
+#define kShadowAlpha 0.4f
+
+//Blur for the shadow behind the PopoverView
+#define kShadowBlur 3.f;
+
+//Box gradient bg alpha
+#define kBoxAlpha 0.95f
+
+//Padding along top of screen to allow for any nav/status bars
+#define kTopMargin 50.f
+
+//margin along the left and right of the box
+#define kHorizontalMargin 10.f
+
+//padding along top of icons/images
+#define kImageTopPadding 3.f
+
+//padding along bottom of icons/images
+#define kImageBottomPadding 3.f
+
+
+// DIVIDERS BETWEEN VIEWS
+
+//Bool that turns off/on the dividers
+#define kShowDividersBetweenViews NO
+
+//color for the divider fill
+#define kDividerColor [UIColor colorWithRed:0.329 green:0.341 blue:0.353 alpha:0.15f]
+
+
+// BACKGROUND GRADIENT
+
+//bottom color white in gradient bg
+#define kGradientBottomColor [UIColor colorWithRed:0.98f green:0.98f blue:0.98f alpha:kBoxAlpha]
+
+//top color white value in gradient bg
+#define kGradientTopColor [UIColor colorWithRed:1.f green:1.f blue:1.f alpha:kBoxAlpha]
+
+
+// TITLE GRADIENT
+
+//bool that turns off/on title gradient
+#define kDrawTitleGradient YES
+
+//bottom color white value in title gradient bg
+#define kGradientTitleBottomColor [UIColor colorWithRed:0.93f green:0.93f blue:0.93f alpha:kBoxAlpha]
+
+//top color white value in title gradient bg
+#define kGradientTitleTopColor [UIColor colorWithRed:1.f green:1.f blue:1.f alpha:kBoxAlpha]
+
+
+// FONTS
+
+//normal text font
+#define kTextFont [UIFont fontWithName:@"HelveticaNeue" size:16.f]
+
+//normal text color
+#define kTextColor [UIColor colorWithRed:0.329 green:0.341 blue:0.353 alpha:1]
+// highlighted text color
+#define kTextHighlightColor [UIColor colorWithRed:0.098 green:0.102 blue:0.106 alpha:1.000]
+
+//normal text alignment
+#define kTextAlignment UITextAlignmentCenter
+
+//title font
+#define kTitleFont [UIFont fontWithName:@"HelveticaNeue-Bold" size:16.f]
+
+//title text color
+#define kTitleColor [UIColor colorWithRed:0.329 green:0.341 blue:0.353 alpha:1]
+
+
+// BORDER
+
+//bool that turns off/on the border
+#define kDrawBorder NO
+
+//border color
+#define kBorderColor [UIColor blackColor]
+
+//border width
+#define kBorderWidth 1.f \ No newline at end of file
diff --git a/ios/iosremote/TestFlightSDK1.2.6/.DS_Store b/ios/iosremote/TestFlightSDK1.2.6/.DS_Store
new file mode 100644
index 000000000000..177ff60b8e96
--- /dev/null
+++ b/ios/iosremote/TestFlightSDK1.2.6/.DS_Store
Binary files differ
diff --git a/ios/iosremote/UIBarButtonItem+Theme.h b/ios/iosremote/UIBarButtonItem+Theme.h
new file mode 100644
index 000000000000..5fa5b74dd181
--- /dev/null
+++ b/ios/iosremote/UIBarButtonItem+Theme.h
@@ -0,0 +1,16 @@
+//
+// UIBarButtonItem+Theme.h
+// VLC for iOS
+//
+// Created by Romain Goyet on 14/06/13.
+// Copyright (c) 2013 Applidium. All rights reserved.
+//
+// Refer to the COPYING file of the official project for license.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UIBarButtonItem (Theme)
++ (UIBarButtonItem *)themedDoneButtonWithTarget:(id)target andSelector:(SEL)selector;
++ (UIBarButtonItem *)themedBackButtonWithTarget:(id)target andSelector:(SEL)selector;
+@end
diff --git a/ios/iosremote/UIBarButtonItem+Theme.m b/ios/iosremote/UIBarButtonItem+Theme.m
new file mode 100644
index 000000000000..4f125fc477ee
--- /dev/null
+++ b/ios/iosremote/UIBarButtonItem+Theme.m
@@ -0,0 +1,48 @@
+//
+// UIBarButtonItem+Theme.m
+// VLC for iOS
+//
+// Created by Romain Goyet on 14/06/13.
+// Copyright (c) 2013 Applidium. All rights reserved.
+//
+// Refer to the COPYING file of the official project for license.
+//
+
+#import "UIBarButtonItem+Theme.h"
+
+@implementation UIBarButtonItem (Theme)
++ (UIBarButtonItem *)themedDoneButtonWithTarget:(id)target andSelector:(SEL)selector
+{
+ UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"BUTTON_DONE", @"")
+ style:UIBarButtonItemStyleBordered
+ target:target
+ action:selector];
+ [doneButton setBackgroundImage:[UIImage imageNamed:@"doneButton"]
+ forState:UIControlStateNormal
+ barMetrics:UIBarMetricsDefault];
+ [doneButton setBackgroundImage:[UIImage imageNamed:@"doneButtonHighlight"]
+ forState:UIControlStateHighlighted
+ barMetrics:UIBarMetricsDefault];
+ [doneButton setTitleTextAttributes:@{UITextAttributeTextShadowColor : [UIColor whiteColor], UITextAttributeTextColor : [UIColor blackColor]}
+ forState:UIControlStateNormal];
+ return doneButton;
+}
+
++ (UIBarButtonItem *)themedBackButtonWithTarget:(id)target andSelector:(SEL)selector
+{
+ UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"BUTTON_BACK", @"")
+ style:UIBarButtonItemStyleBordered
+ target:target
+ action:selector];
+ [backButton setBackgroundImage:[[UIImage imageNamed:@"backButton"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 12, 0, 6)]
+ forState:UIControlStateNormal
+ barMetrics:UIBarMetricsDefault];
+ [backButton setBackgroundImage:[[UIImage imageNamed:@"backButtonHighlight"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 12, 0, 6)]
+ forState:UIControlStateHighlighted
+ barMetrics:UIBarMetricsDefault];
+ [backButton setTitleTextAttributes:@{UITextAttributeTextShadowColor : [UIColor colorWithWhite:0. alpha:.37], UITextAttributeTextColor : [UIColor whiteColor]} forState:UIControlStateNormal];
+ [backButton setTitlePositionAdjustment:UIOffsetMake(3, 0) forBarMetrics:UIBarMetricsDefault];
+ return backButton;
+}
+
+@end
diff --git a/ios/iosremote/UINavigationController+Theme.h b/ios/iosremote/UINavigationController+Theme.h
new file mode 100644
index 000000000000..2a27d8ea97cf
--- /dev/null
+++ b/ios/iosremote/UINavigationController+Theme.h
@@ -0,0 +1,15 @@
+//
+// UINavigationController+Theme.h
+// VLC for iOS
+//
+// Created by Romain Goyet on 14/06/13.
+// Copyright (c) 2013 Applidium. All rights reserved.
+//
+// Refer to the COPYING file of the official project for license.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UINavigationController (Theme)
+- (void)loadTheme;
+@end
diff --git a/ios/iosremote/UINavigationController+Theme.m b/ios/iosremote/UINavigationController+Theme.m
new file mode 100644
index 000000000000..5e8ed3a91825
--- /dev/null
+++ b/ios/iosremote/UINavigationController+Theme.m
@@ -0,0 +1,23 @@
+//
+// UINavigationController+Theme.m
+// VLC for iOS
+//
+// Created by Romain Goyet on 14/06/13.
+// Copyright (c) 2013 Applidium. All rights reserved.
+//
+// Refer to the COPYING file of the official project for license.
+//
+
+#import "UINavigationController+Theme.h"
+
+@implementation UINavigationController (Theme)
+- (void)loadTheme
+{
+ UINavigationBar *navBar = self.navigationBar;
+ [navBar setBackgroundImage:[UIImage imageNamed:@"navBarBackground"]
+ forBarMetrics:UIBarMetricsDefault];
+ [navBar setBackgroundImage:[UIImage imageNamed:@"navBarBackgroundPhoneLandscape"]
+ forBarMetrics:UIBarMetricsLandscapePhone];
+ navBar.barStyle = UIBarStyleBlack;
+}
+@end
diff --git a/ios/iosremote/iPad_autosize.storyboard b/ios/iosremote/iPad_autosize.storyboard
index 804740f5f45c..4883c1be0df5 100644
--- a/ios/iosremote/iPad_autosize.storyboard
+++ b/ios/iosremote/iPad_autosize.storyboard
@@ -47,7 +47,7 @@
<action selector="cancelModalView:" destination="5QV-E7-KNT" id="rSl-Rp-xQb"/>
</connections>
</barButtonItem>
- <barButtonItem key="rightBarButtonItem" systemItem="add" id="pU6-XF-laS">
+ <barButtonItem key="rightBarButtonItem" image="add.png" id="pU6-XF-laS">
<connections>
<segue destination="65c-5D-pB7" kind="push" identifier="create_new_server" id="ORn-0W-dHd"/>
</connections>
@@ -367,6 +367,21 @@
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="jBq-0A-D38">
+ <rect key="frame" x="683.5" y="898.5" width="97" height="59"/>
+ <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+ <state key="normal" backgroundImage="gear.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="gear_pressed">
+ <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <connections>
+ <action selector="popOverUp:" destination="TYh-Hw-m1Q" eventType="touchUpInside" id="0Zm-gv-gne"/>
+ </connections>
+ </button>
<view alpha="0.50000000000000011" contentMode="scaleToFill" id="jX5-gj-cqE">
<rect key="frame" x="0.0" y="0.0" width="768" height="1004"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -400,7 +415,7 @@
<size key="shadowOffset" width="0.0" height="0.0"/>
</label>
</subviews>
- <color key="backgroundColor" red="0.29803921568627451" green="0.74509803921568629" blue="0.22745098039215686" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="backgroundColor" red="0.89411764709999997" green="0.43529411759999997" blue="0.1215686275" alpha="1" colorSpace="calibratedRGB"/>
</view>
</subviews>
<color key="backgroundColor" red="0.90196079019999997" green="0.90196079019999997" blue="0.90196079019999997" alpha="1" colorSpace="calibratedRGB"/>
@@ -411,6 +426,7 @@
<outlet property="NotesView" destination="Pk1-fD-KAi" id="2ZD-si-fls"/>
<outlet property="clearButton" destination="MKb-4h-13P" id="7Xz-n6-sre"/>
<outlet property="currentSlideImageView" destination="x7C-rs-s4K" id="Qtf-99-j0C"/>
+ <outlet property="gearButton" destination="jBq-0A-D38" id="ATa-gU-YT0"/>
<outlet property="horizontalTableView" destination="Iok-mu-c0T" id="SJT-pa-4Hb"/>
<outlet property="movingPointer" destination="2SJ-3f-E3k" id="mxV-zz-hjx"/>
<outlet property="nextButton" destination="bfp-PJ-NrP" id="1Uf-1g-iQl"/>
@@ -526,6 +542,9 @@
</scenes>
<resources>
<image name="Default-568h@2x.png" width="640" height="1136"/>
+ <image name="add.png" width="24" height="24"/>
+ <image name="gear.png" width="55" height="35"/>
+ <image name="gear_pressed" width="16" height="16"/>
<image name="libO_icon.png" width="598" height="598"/>
<image name="nextButton_normal.png" width="42" height="230"/>
<image name="nextButton_pressed.png" width="42" height="230"/>
@@ -534,6 +553,86 @@
<image name="timer_clear_btn.png" width="74" height="74"/>
<image name="timer_start_btn.png" width="74" height="74"/>
</resources>
+ <classes>
+ <class className="BasePresentationViewController" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/BasePresentationViewController.h"/>
+ <relationships>
+ <relationship kind="action" name="nextSlideAction:"/>
+ <relationship kind="action" name="previousSlideAction:"/>
+ <relationship kind="action" name="startConnectionModal:"/>
+ <relationship kind="outlet" name="NoteWebView" candidateClass="UIWebView"/>
+ <relationship kind="outlet" name="NotesView" candidateClass="UIView"/>
+ <relationship kind="outlet" name="clearButton" candidateClass="UIButton"/>
+ <relationship kind="outlet" name="currentSlideImageView" candidateClass="UIImageView"/>
+ <relationship kind="outlet" name="gearButton" candidateClass="UIButton"/>
+ <relationship kind="outlet" name="horizontalTableView" candidateClass="UITableView"/>
+ <relationship kind="outlet" name="movingPointer" candidateClass="UIView"/>
+ <relationship kind="outlet" name="nextButton" candidateClass="UIButton"/>
+ <relationship kind="outlet" name="previousButton" candidateClass="UIButton"/>
+ <relationship kind="outlet" name="slideNumber" candidateClass="UILabel"/>
+ <relationship kind="outlet" name="startButton" candidateClass="UIButton"/>
+ <relationship kind="outlet" name="timeLabel" candidateClass="UILabel"/>
+ <relationship kind="outlet" name="welcome_blocking_page" candidateClass="UIView"/>
+ <relationship kind="outlet" name="welcome_connect_button" candidateClass="UIButton"/>
+ <relationship kind="outlet" name="welcome_label" candidateClass="UILabel"/>
+ <relationship kind="outlet" name="welcome_libO_icon" candidateClass="UIImageView"/>
+ </relationships>
+ </class>
+ <class className="EditableTableViewCell" superclassName="UITableViewCell">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/EditableTableViewCell.h"/>
+ </class>
+ <class className="LibONavigationController" superclassName="UINavigationController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/LibONavigationController.h"/>
+ </class>
+ <class className="MainSplitViewController" superclassName="UISplitViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/MainSplitViewController.h"/>
+ </class>
+ <class className="autoDismissKeyboardNavigationViewController" superclassName="LibONavigationController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/autoDismissKeyboardNavigationViewController.h"/>
+ </class>
+ <class className="newServerViewController" superclassName="UITableViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/newServerViewController.h"/>
+ <relationships>
+ <relationship kind="action" name="save:"/>
+ <relationship kind="outlet" name="saveButton" candidateClass="UIBarButtonItem"/>
+ </relationships>
+ </class>
+ <class className="pinValidation_vc" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/pinValidation_vc.h"/>
+ <relationships>
+ <relationship kind="outlet" name="pinLabel" candidateClass="UILabel"/>
+ <relationship kind="outlet" name="statusLabel" candidateClass="UILabel"/>
+ </relationships>
+ </class>
+ <class className="server_list_vc" superclassName="UITableViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/server_list_vc.h"/>
+ <relationships>
+ <relationship kind="outlet" name="serverTable" candidateClass="UITableView"/>
+ </relationships>
+ </class>
+ <class className="server_list_vc_ipad" superclassName="server_list_vc">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/server_list_vc_ipad.h"/>
+ <relationships>
+ <relationship kind="action" name="cancelModalView:"/>
+ </relationships>
+ </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="slideShowPreviewTable_vc_ipad" superclassName="slideShowPreviewTable_vc">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/slideShowPreviewTable_vc_ipad.h"/>
+ <relationships>
+ <relationship kind="outlet" name="titleLabel" candidateClass="UILabel"/>
+ </relationships>
+ </class>
+ <class className="slideShowSwipeInList_ipad" superclassName="UITableViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/slideShowSwipeInList_ipad.h"/>
+ </class>
+ </classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackTranslucent"/>
<simulatedOrientationMetrics key="orientation"/>
diff --git a/ios/iosremote/iosremote.xcodeproj/project.pbxproj b/ios/iosremote/iosremote.xcodeproj/project.pbxproj
index 2d8dc71d6e98..6ba9a7c29280 100644
--- a/ios/iosremote/iosremote.xcodeproj/project.pbxproj
+++ b/ios/iosremote/iosremote.xcodeproj/project.pbxproj
@@ -63,7 +63,26 @@
8C0DC84717A45B160099E5AE /* libO_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C0DC84617A45B160099E5AE /* libO_icon.png */; };
8C0DC85117A512250099E5AE /* AppDelegate_ipad.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C0DC85017A512250099E5AE /* AppDelegate_ipad.m */; };
8C19F41D17B00899005BDB61 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C19F41C17B00899005BDB61 /* SystemConfiguration.framework */; };
- 8C1A16FB17A2853100B4BB3C /* iosremote_iphone_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C1A16FA17A2853100B4BB3C /* iosremote_iphone_icon@2x.png */; };
+ 8C19F41F17B02A8A005BDB61 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C19F41E17B02A8A005BDB61 /* QuartzCore.framework */; };
+ 8C19F42417B02C7A005BDB61 /* PopoverView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C19F42117B02AA9005BDB61 /* PopoverView.m */; };
+ 8C19F42717B04E7C005BDB61 /* navBarBackground@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C19F42517B04E7C005BDB61 /* navBarBackground@2x.png */; };
+ 8C19F42817B04E7C005BDB61 /* navBarBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C19F42617B04E7C005BDB61 /* navBarBackground.png */; };
+ 8C19F42F17B05089005BDB61 /* LibONavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C19F42E17B05089005BDB61 /* LibONavigationController.m */; };
+ 8C19F43017B0518A005BDB61 /* UINavigationController+Theme.h in Sources */ = {isa = PBXBuildFile; fileRef = 8C19F42917B04EC6005BDB61 /* UINavigationController+Theme.h */; };
+ 8C19F43117B0518A005BDB61 /* UINavigationController+Theme.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C19F42A17B04EC6005BDB61 /* UINavigationController+Theme.m */; };
+ 8C19F43317B056B3005BDB61 /* navBarButtonNormal@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C19F43217B056B3005BDB61 /* navBarButtonNormal@2x.png */; };
+ 8C19F43617B10D49005BDB61 /* UIViewController+LibOStyling.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C19F43517B10D49005BDB61 /* UIViewController+LibOStyling.m */; };
+ 8C19F43917B145AD005BDB61 /* backButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C19F43717B145AD005BDB61 /* backButton.png */; };
+ 8C19F43A17B145AD005BDB61 /* backButton@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C19F43817B145AD005BDB61 /* backButton@2x.png */; };
+ 8C19F43E17B1D935005BDB61 /* add.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C19F43C17B1D935005BDB61 /* add.png */; };
+ 8C19F44117B1E961005BDB61 /* gear.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C19F43F17B1E961005BDB61 /* gear.png */; };
+ 8C19F44217B1E961005BDB61 /* gear@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C19F44017B1E961005BDB61 /* gear@2x.png */; };
+ 8C19F44517B1F21B005BDB61 /* gear_pressed.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C19F44317B1F21B005BDB61 /* gear_pressed.png */; };
+ 8C19F44617B1F21B005BDB61 /* gear_pressed@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C19F44417B1F21B005BDB61 /* gear_pressed@2x.png */; };
+ 8C19F44717B1FB51005BDB61 /* iosremote_iphone_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C1A16FA17A2853100B4BB3C /* iosremote_iphone_icon@2x.png */; };
+ 8C19F44A17B1FEFE005BDB61 /* gear_transparent_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C19F44817B1FEFD005BDB61 /* gear_transparent_bg.png */; };
+ 8C19F44B17B1FEFE005BDB61 /* gear_transparent_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C19F44917B1FEFE005BDB61 /* gear_transparent_bg@2x.png */; };
+ 8C19F44D17B20427005BDB61 /* add@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C19F44C17B20426005BDB61 /* add@2x.png */; };
8C1A16FD17A2853700B4BB3C /* iosremote_iphone_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C1A16FC17A2853700B4BB3C /* iosremote_iphone_icon.png */; };
8C1A16FF17A2853F00B4BB3C /* iosremote_ipad_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C1A16FE17A2853F00B4BB3C /* iosremote_ipad_icon.png */; };
8C1A170117A2854300B4BB3C /* iosremote_ipad_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C1A170017A2854300B4BB3C /* iosremote_ipad_icon@2x.png */; };
@@ -167,6 +186,32 @@
8C0DC84F17A512250099E5AE /* AppDelegate_ipad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate_ipad.h; path = iosremote/AppDelegate_ipad.h; sourceTree = "<group>"; };
8C0DC85017A512250099E5AE /* AppDelegate_ipad.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate_ipad.m; path = iosremote/AppDelegate_ipad.m; sourceTree = "<group>"; };
8C19F41C17B00899005BDB61 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+ 8C19F41E17B02A8A005BDB61 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+ 8C19F42017B02AA9005BDB61 /* PopoverView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PopoverView.h; sourceTree = "<group>"; };
+ 8C19F42117B02AA9005BDB61 /* PopoverView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PopoverView.m; sourceTree = "<group>"; };
+ 8C19F42217B02C2E005BDB61 /* PopoverView_Configuration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PopoverView_Configuration.h; sourceTree = "<group>"; };
+ 8C19F42317B02C2E005BDB61 /* PopoverViewCompatibility.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PopoverViewCompatibility.h; sourceTree = "<group>"; };
+ 8C19F42517B04E7C005BDB61 /* navBarBackground@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "navBarBackground@2x.png"; sourceTree = "<group>"; };
+ 8C19F42617B04E7C005BDB61 /* navBarBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = navBarBackground.png; sourceTree = "<group>"; };
+ 8C19F42917B04EC6005BDB61 /* UINavigationController+Theme.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UINavigationController+Theme.h"; sourceTree = "<group>"; };
+ 8C19F42A17B04EC6005BDB61 /* UINavigationController+Theme.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UINavigationController+Theme.m"; sourceTree = "<group>"; };
+ 8C19F42B17B04EC6005BDB61 /* UIBarButtonItem+Theme.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIBarButtonItem+Theme.h"; sourceTree = "<group>"; };
+ 8C19F42C17B04EC6005BDB61 /* UIBarButtonItem+Theme.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIBarButtonItem+Theme.m"; sourceTree = "<group>"; };
+ 8C19F42D17B05089005BDB61 /* LibONavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LibONavigationController.h; path = iosremote/LibONavigationController.h; sourceTree = "<group>"; };
+ 8C19F42E17B05089005BDB61 /* LibONavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LibONavigationController.m; path = iosremote/LibONavigationController.m; sourceTree = "<group>"; };
+ 8C19F43217B056B3005BDB61 /* navBarButtonNormal@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "navBarButtonNormal@2x.png"; path = "iosremote/navBarButtonNormal@2x.png"; sourceTree = "<group>"; };
+ 8C19F43417B10D48005BDB61 /* UIViewController+LibOStyling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIViewController+LibOStyling.h"; path = "iosremote/UIViewController+LibOStyling.h"; sourceTree = "<group>"; };
+ 8C19F43517B10D49005BDB61 /* UIViewController+LibOStyling.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+LibOStyling.m"; path = "iosremote/UIViewController+LibOStyling.m"; sourceTree = "<group>"; };
+ 8C19F43717B145AD005BDB61 /* backButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backButton.png; path = iosremote/backButton.png; sourceTree = "<group>"; };
+ 8C19F43817B145AD005BDB61 /* backButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "backButton@2x.png"; path = "iosremote/backButton@2x.png"; sourceTree = "<group>"; };
+ 8C19F43C17B1D935005BDB61 /* add.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = add.png; path = iosremote/add.png; sourceTree = "<group>"; };
+ 8C19F43F17B1E961005BDB61 /* gear.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = gear.png; path = iosremote/gear.png; sourceTree = "<group>"; };
+ 8C19F44017B1E961005BDB61 /* gear@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "gear@2x.png"; path = "iosremote/gear@2x.png"; sourceTree = "<group>"; };
+ 8C19F44317B1F21B005BDB61 /* gear_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = gear_pressed.png; path = iosremote/gear_pressed.png; sourceTree = "<group>"; };
+ 8C19F44417B1F21B005BDB61 /* gear_pressed@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "gear_pressed@2x.png"; path = "iosremote/gear_pressed@2x.png"; sourceTree = "<group>"; };
+ 8C19F44817B1FEFD005BDB61 /* gear_transparent_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = gear_transparent_bg.png; path = iosremote/gear_transparent_bg.png; sourceTree = "<group>"; };
+ 8C19F44917B1FEFE005BDB61 /* gear_transparent_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "gear_transparent_bg@2x.png"; path = "iosremote/gear_transparent_bg@2x.png"; sourceTree = "<group>"; };
+ 8C19F44C17B20426005BDB61 /* add@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "add@2x.png"; path = "iosremote/add@2x.png"; sourceTree = "<group>"; };
8C1A16FA17A2853100B4BB3C /* iosremote_iphone_icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "iosremote_iphone_icon@2x.png"; sourceTree = "<group>"; };
8C1A16FC17A2853700B4BB3C /* iosremote_iphone_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = iosremote_iphone_icon.png; sourceTree = "<group>"; };
8C1A16FE17A2853F00B4BB3C /* iosremote_ipad_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = iosremote_ipad_icon.png; sourceTree = "<group>"; };
@@ -212,6 +257,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 8C19F41F17B02A8A005BDB61 /* QuartzCore.framework in Frameworks */,
8C19F41D17B00899005BDB61 /* SystemConfiguration.framework in Frameworks */,
571102701794128E007D343B /* libz.dylib in Frameworks */,
57DC7007178D84490050FC58 /* CoreMotion.framework in Frameworks */,
@@ -261,6 +307,19 @@
57AEEDAA1788D7B2007F4F97 /* Ressources */ = {
isa = PBXGroup;
children = (
+ 8C19F44C17B20426005BDB61 /* add@2x.png */,
+ 8C19F44817B1FEFD005BDB61 /* gear_transparent_bg.png */,
+ 8C19F44917B1FEFE005BDB61 /* gear_transparent_bg@2x.png */,
+ 8C19F44317B1F21B005BDB61 /* gear_pressed.png */,
+ 8C19F44417B1F21B005BDB61 /* gear_pressed@2x.png */,
+ 8C19F43F17B1E961005BDB61 /* gear.png */,
+ 8C19F44017B1E961005BDB61 /* gear@2x.png */,
+ 8C19F43C17B1D935005BDB61 /* add.png */,
+ 8C19F43717B145AD005BDB61 /* backButton.png */,
+ 8C19F43817B145AD005BDB61 /* backButton@2x.png */,
+ 8C19F43217B056B3005BDB61 /* navBarButtonNormal@2x.png */,
+ 8C19F42517B04E7C005BDB61 /* navBarBackground@2x.png */,
+ 8C19F42617B04E7C005BDB61 /* navBarBackground.png */,
8C26E5D117A5AFE8007DA4B7 /* slideshowRail.png */,
8C26E5D217A5AFE8007DA4B7 /* slideshowRail@2x.png */,
8C0DC84617A45B160099E5AE /* libO_icon.png */,
@@ -310,6 +369,7 @@
57C6E3E6175E06E800E8BC5F = {
isa = PBXGroup;
children = (
+ 8C19F41E17B02A8A005BDB61 /* QuartzCore.framework */,
8C19F41C17B00899005BDB61 /* SystemConfiguration.framework */,
8C1A170217A28AB900B4BB3C /* Shared */,
8C1A170917A28E6500B4BB3C /* iPhone */,
@@ -415,6 +475,10 @@
8C1A170617A28DDF00B4BB3C /* Support */ = {
isa = PBXGroup;
children = (
+ 8C19F42017B02AA9005BDB61 /* PopoverView.h */,
+ 8C19F42217B02C2E005BDB61 /* PopoverView_Configuration.h */,
+ 8C19F42317B02C2E005BDB61 /* PopoverViewCompatibility.h */,
+ 8C19F42117B02AA9005BDB61 /* PopoverView.m */,
57B152971764703500EECC67 /* Base64.h */,
57B152981764703500EECC67 /* Base64.m */,
57CFED9717838FDC00E82E05 /* EditableTableViewCell.h */,
@@ -428,6 +492,14 @@
8C26E5D617A68154007DA4B7 /* stopWatch.m */,
8C0323A917A943720037432E /* UIImageView+setImageAnimated.h */,
8C0323AA17A943720037432E /* UIImageView+setImageAnimated.m */,
+ 8C19F42917B04EC6005BDB61 /* UINavigationController+Theme.h */,
+ 8C19F42A17B04EC6005BDB61 /* UINavigationController+Theme.m */,
+ 8C19F42B17B04EC6005BDB61 /* UIBarButtonItem+Theme.h */,
+ 8C19F42C17B04EC6005BDB61 /* UIBarButtonItem+Theme.m */,
+ 8C19F42D17B05089005BDB61 /* LibONavigationController.h */,
+ 8C19F42E17B05089005BDB61 /* LibONavigationController.m */,
+ 8C19F43417B10D48005BDB61 /* UIViewController+LibOStyling.h */,
+ 8C19F43517B10D49005BDB61 /* UIViewController+LibOStyling.m */,
);
name = Support;
sourceTree = "<group>";
@@ -585,7 +657,6 @@
57DF0A85178FFFAB008B2D3D /* iPhone_autosize.storyboard in Resources */,
5711026D1794127E007D343B /* README.md in Resources */,
5711026E1794127E007D343B /* release_notes.md in Resources */,
- 8C1A16FB17A2853100B4BB3C /* iosremote_iphone_icon@2x.png in Resources */,
8C1A16FD17A2853700B4BB3C /* iosremote_iphone_icon.png in Resources */,
8C1A16FF17A2853F00B4BB3C /* iosremote_ipad_icon.png in Resources */,
8C1A170117A2854300B4BB3C /* iosremote_ipad_icon@2x.png in Resources */,
@@ -606,6 +677,20 @@
8C26E5C617A5539D007DA4B7 /* UserDefaults.plist in Resources */,
8C26E5D317A5AFE8007DA4B7 /* slideshowRail.png in Resources */,
8C26E5D417A5AFE8007DA4B7 /* slideshowRail@2x.png in Resources */,
+ 8C19F42717B04E7C005BDB61 /* navBarBackground@2x.png in Resources */,
+ 8C19F42817B04E7C005BDB61 /* navBarBackground.png in Resources */,
+ 8C19F43317B056B3005BDB61 /* navBarButtonNormal@2x.png in Resources */,
+ 8C19F43917B145AD005BDB61 /* backButton.png in Resources */,
+ 8C19F43A17B145AD005BDB61 /* backButton@2x.png in Resources */,
+ 8C19F43E17B1D935005BDB61 /* add.png in Resources */,
+ 8C19F44117B1E961005BDB61 /* gear.png in Resources */,
+ 8C19F44217B1E961005BDB61 /* gear@2x.png in Resources */,
+ 8C19F44517B1F21B005BDB61 /* gear_pressed.png in Resources */,
+ 8C19F44617B1F21B005BDB61 /* gear_pressed@2x.png in Resources */,
+ 8C19F44717B1FB51005BDB61 /* iosremote_iphone_icon@2x.png in Resources */,
+ 8C19F44A17B1FEFE005BDB61 /* gear_transparent_bg.png in Resources */,
+ 8C19F44B17B1FEFE005BDB61 /* gear_transparent_bg@2x.png in Resources */,
+ 8C19F44D17B20427005BDB61 /* add@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -616,6 +701,9 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 8C19F43017B0518A005BDB61 /* UINavigationController+Theme.h in Sources */,
+ 8C19F43117B0518A005BDB61 /* UINavigationController+Theme.m in Sources */,
+ 8C19F42417B02C7A005BDB61 /* PopoverView.m in Sources */,
57C6E3FF175E06E800E8BC5F /* main.m in Sources */,
57C6E403175E06E800E8BC5F /* AppDelegate.m in Sources */,
57C6E42E175E076900E8BC5F /* Client.m in Sources */,
@@ -645,6 +733,8 @@
8C26E5D017A58703007DA4B7 /* HorizontalSlideCell.m in Sources */,
8C26E5D717A68154007DA4B7 /* stopWatch.m in Sources */,
8C0323AB17A943720037432E /* UIImageView+setImageAnimated.m in Sources */,
+ 8C19F42F17B05089005BDB61 /* LibONavigationController.m in Sources */,
+ 8C19F43617B10D49005BDB61 /* UIViewController+LibOStyling.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/me.xcuserdatad/UserInterfaceState.xcuserstate b/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/me.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 000000000000..7c5659739ed5
--- /dev/null
+++ b/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/me.xcuserdatad/UserInterfaceState.xcuserstate
Binary files differ
diff --git a/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/me.xcuserdatad/WorkspaceSettings.xcsettings b/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/me.xcuserdatad/WorkspaceSettings.xcsettings
new file mode 100644
index 000000000000..bfffcfe01a44
--- /dev/null
+++ b/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/me.xcuserdatad/WorkspaceSettings.xcsettings
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges</key>
+ <true/>
+ <key>SnapshotAutomaticallyBeforeSignificantChanges</key>
+ <false/>
+</dict>
+</plist>
diff --git a/ios/iosremote/iosremote.xcodeproj/xcuserdata/me.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/ios/iosremote/iosremote.xcodeproj/xcuserdata/me.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
new file mode 100644
index 000000000000..bbe3fd75c3f8
--- /dev/null
+++ b/ios/iosremote/iosremote.xcodeproj/xcuserdata/me.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+ type = "1"
+ version = "1.0">
+ <FileBreakpoints>
+ <FileBreakpoint
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "iosremote/Communication/CommunicationManager.m"
+ timestampString = "397412570.155324"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "77"
+ endingLineNumber = "77"
+ landmarkName = "-connectionStatusHandler:"
+ landmarkType = "5">
+ </FileBreakpoint>
+ </FileBreakpoints>
+</Bucket>
diff --git a/ios/iosremote/iosremote.xcodeproj/xcuserdata/me.xcuserdatad/xcschemes/iosremote.xcscheme b/ios/iosremote/iosremote.xcodeproj/xcuserdata/me.xcuserdatad/xcschemes/iosremote.xcscheme
new file mode 100644
index 000000000000..5d04313e5d82
--- /dev/null
+++ b/ios/iosremote/iosremote.xcodeproj/xcuserdata/me.xcuserdatad/xcschemes/iosremote.xcscheme
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0460"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "57C6E3EE175E06E800E8BC5F"
+ BuildableName = "Impress.app"
+ BlueprintName = "Impress"
+ ReferencedContainer = "container:iosremote.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "57C6E3EE175E06E800E8BC5F"
+ BuildableName = "Impress.app"
+ BlueprintName = "Impress"
+ ReferencedContainer = "container:iosremote.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "57C6E3EE175E06E800E8BC5F"
+ BuildableName = "Impress.app"
+ BlueprintName = "Impress"
+ ReferencedContainer = "container:iosremote.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "57C6E3EE175E06E800E8BC5F"
+ BuildableName = "Impress.app"
+ BlueprintName = "Impress"
+ ReferencedContainer = "container:iosremote.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/ios/iosremote/iosremote.xcodeproj/xcuserdata/me.xcuserdatad/xcschemes/xcschememanagement.plist b/ios/iosremote/iosremote.xcodeproj/xcuserdata/me.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 000000000000..74079c753a96
--- /dev/null
+++ b/ios/iosremote/iosremote.xcodeproj/xcuserdata/me.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>iosremote.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>57C6E3EE175E06E800E8BC5F</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
diff --git a/ios/iosremote/iosremote/.DS_Store b/ios/iosremote/iosremote/.DS_Store
index df8452458516..8c01359dcb17 100644
--- a/ios/iosremote/iosremote/.DS_Store
+++ b/ios/iosremote/iosremote/.DS_Store
Binary files differ
diff --git a/ios/iosremote/iosremote/AppDelegate.m b/ios/iosremote/iosremote/AppDelegate.m
index d39331b3a114..0475bb60082e 100644
--- a/ios/iosremote/iosremote/AppDelegate.m
+++ b/ios/iosremote/iosremote/AppDelegate.m
@@ -7,7 +7,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#import "AppDelegate.h"
-
+#import "UINavigationController+Theme.h"
@implementation AppDelegate
@synthesize window = _window;
@@ -38,14 +38,27 @@
// mainStoryboard = [UIStoryboard storyboardWithName:@"iPhone_autolayout" bundle:nil];
// NSLog(@"loading autolayout storyboard");
// } else {
-// mainStoryboard = [UIStoryboard storyboardWithName:@"iPhone_autosize" bundle:nil];
+// UIStoryboard * mainStoryboard = [UIStoryboard storyboardWithName:@"iPhone_autosize" bundle:nil];
// NSLog(@"Doesn't support autolayout, loading autosize");
// }
//
// self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// self.window.rootViewController = [mainStoryboard instantiateInitialViewController];
+// [(UINavigationController *)self.window.rootViewController loadTheme];
// [self.window makeKeyAndVisible];
+ [[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil]
+ setBackgroundImage:[UIImage imageNamed:@"navBarButtonNormal"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
+ NSDictionary *attributes = [NSDictionary dictionaryWithObjects:
+ [NSArray arrayWithObjects: [UIFont boldSystemFontOfSize:15], [UIColor colorWithRed:1.0 green:0.231372549 blue:0.188235294 alpha:1.0], [UIColor clearColor], nil]
+ forKeys: [NSArray arrayWithObjects:UITextAttributeFont, UITextAttributeTextColor, UITextAttributeTextShadowColor, nil]];
+ [[UIBarButtonItem appearance] setTitleTextAttributes:attributes
+ forState:UIControlStateNormal];
+ attributes = [NSDictionary dictionaryWithObjects:
+ [NSArray arrayWithObjects: [UIFont boldSystemFontOfSize:15], [UIColor grayColor], [UIColor clearColor], nil]
+ forKeys: [NSArray arrayWithObjects:UITextAttributeFont, UITextAttributeTextColor, UITextAttributeTextShadowColor, nil]];
+ [[UIBarButtonItem appearance] setTitleTextAttributes:attributes
+ forState:UIControlStateHighlighted];
return YES;
}
diff --git a/ios/iosremote/iosremote/BasePresentationViewController.h b/ios/iosremote/iosremote/BasePresentationViewController.h
index 1f6b7670dfdc..673de5f70b90 100644
--- a/ios/iosremote/iosremote/BasePresentationViewController.h
+++ b/ios/iosremote/iosremote/BasePresentationViewController.h
@@ -38,6 +38,9 @@
@property (weak, nonatomic) IBOutlet UIButton *clearButton;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
+@property (weak, nonatomic) IBOutlet UIButton *gearButton;
+- (IBAction)popOverUp:(id)sender;
+
//Reconnection
- (void) didReceiveDisconnection;
diff --git a/ios/iosremote/iosremote/BasePresentationViewController.m b/ios/iosremote/iosremote/BasePresentationViewController.m
index 26441ede4e81..f586146f07b4 100644
--- a/ios/iosremote/iosremote/BasePresentationViewController.m
+++ b/ios/iosremote/iosremote/BasePresentationViewController.m
@@ -15,6 +15,7 @@
#import "HorizontalSlideCell.h"
#import "MainSplitViewController.h"
#import "stopWatch.h"
+#import "PopoverView.h"
#import "ControlVariables.h"
@@ -25,7 +26,7 @@
#define CURRENT_SLIDE_IMAGEVIEW 19
#define CURRENT_SLIDE_NOTES 18
-@interface BasePresentationViewController ()
+@interface BasePresentationViewController () <PopoverViewDelegate>
@property (nonatomic, strong) CommunicationManager *comManager;
@property (nonatomic, strong) id slideShowImageNoteReadyObserver;
@@ -430,6 +431,7 @@
[self setClearButton:nil];
[self setTimeLabel:nil];
[self setWelcome_label:nil];
+ [self setGearButton:nil];
[super viewDidUnload];
}
@@ -464,6 +466,50 @@
}];
}
+static BOOL isBlank = NO;
+#pragma mark - Popover toggle
+- (IBAction)popOverUp:(id)sender {
+ if (!isBlank) {
+ [PopoverView showPopoverAtPoint:self.gearButton.frame.origin inView:self.view withStringArray:
+ [NSArray arrayWithObjects:@"Stop Presentation", @"Restart", @"Blank Screen", nil]
+ delegate:self];
+ } else {
+ [PopoverView showPopoverAtPoint:self.gearButton.frame.origin inView:self.view withStringArray:
+ [NSArray arrayWithObjects:@"Stop Presentation", @"Restart", @"Resume from blank Screen", nil]
+ delegate:self];
+ }
+ [UIView animateWithDuration:0.24 animations:^{
+ [self.gearButton setCenter:CGPointMake(self.gearButton.center.x - 20, self.gearButton.center.y)];
+ }];
+}
+
+- (void)popoverView:(PopoverView *)popoverView didSelectItemAtIndex:(NSInteger)index
+{
+ [popoverView dismiss];
+ switch (index) {
+ case 0:
+ [self.comManager.transmitter stopPresentation];
+ break;
+ case 1:
+ [self.comManager.transmitter gotoSlide:0];
+ case 2:
+ if (!isBlank){
+ [self.comManager.transmitter blankScreen];
+ } else {
+ [self.comManager.transmitter resume];
+ }
+ isBlank = !isBlank;
+ default:
+ break;
+ }
+}
+
+- (void) popoverViewDidDismiss:(PopoverView *)popoverView
+{
+ [UIView animateWithDuration:0.24 animations:^{
+ [self.gearButton setCenter:CGPointMake(self.gearButton.center.x + 20, self.gearButton.center.y)];
+ }];
+}
#pragma mark - Reconnection
- (void) didReceiveDisconnection
diff --git a/ios/iosremote/iosremote/LibONavigationController.h b/ios/iosremote/iosremote/LibONavigationController.h
new file mode 100644
index 000000000000..4e940f42312b
--- /dev/null
+++ b/ios/iosremote/iosremote/LibONavigationController.h
@@ -0,0 +1,13 @@
+//
+// LibONavigationController.h
+// iosremote
+//
+// Created by Siqi Liu on 8/5/13.
+// Copyright (c) 2013 libreoffice. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface LibONavigationController : UINavigationController
+
+@end
diff --git a/ios/iosremote/iosremote/LibONavigationController.m b/ios/iosremote/iosremote/LibONavigationController.m
new file mode 100644
index 000000000000..efe2929e6973
--- /dev/null
+++ b/ios/iosremote/iosremote/LibONavigationController.m
@@ -0,0 +1,44 @@
+//
+// LibONavigationController.m
+// iosremote
+//
+// Created by Siqi Liu on 8/5/13.
+// Copyright (c) 2013 libreoffice. All rights reserved.
+//
+
+#import "LibONavigationController.h"
+#import "UINavigationController+Theme.h"
+
+@interface LibONavigationController ()
+
+@end
+
+@implementation LibONavigationController
+
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
+{
+ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
+ if (self) {
+ }
+ return self;
+}
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ [self loadTheme];
+
+ // Do any additional setup after loading the view.
+}
+
+- (void)viewWillAppear:(BOOL)animated
+{
+ [super viewWillAppear:animated];
+}
+- (void)didReceiveMemoryWarning
+{
+ [super didReceiveMemoryWarning];
+ // Dispose of any resources that can be recreated.
+}
+
+@end
diff --git a/ios/iosremote/iosremote/SWRevealViewController/navBarBackground@2x.png b/ios/iosremote/iosremote/SWRevealViewController/navBarBackground@2x.png
new file mode 100644
index 000000000000..9f103a097d5f
--- /dev/null
+++ b/ios/iosremote/iosremote/SWRevealViewController/navBarBackground@2x.png
Binary files differ
diff --git a/ios/iosremote/iosremote/UIViewController+LibOStyling.h b/ios/iosremote/iosremote/UIViewController+LibOStyling.h
new file mode 100644
index 000000000000..dbd8dc193da0
--- /dev/null
+++ b/ios/iosremote/iosremote/UIViewController+LibOStyling.h
@@ -0,0 +1,15 @@
+//
+// UIViewController+LibOStyling.h
+// iosremote
+//
+// Created by Siqi Liu on 8/6/13.
+// Copyright (c) 2013 libreoffice. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UIViewController (LibOStyling)
+
+- (void)setTitle:(NSString *)title;
+
+@end
diff --git a/ios/iosremote/iosremote/UIViewController+LibOStyling.m b/ios/iosremote/iosremote/UIViewController+LibOStyling.m
new file mode 100644
index 000000000000..c6b69343780a
--- /dev/null
+++ b/ios/iosremote/iosremote/UIViewController+LibOStyling.m
@@ -0,0 +1,35 @@
+//
+// UIViewController+LibOStyling.m
+// iosremote
+//
+// Created by Siqi Liu on 8/6/13.
+// Copyright (c) 2013 libreoffice. All rights reserved.
+//
+
+#import "UIViewController+LibOStyling.h"
+
+@implementation UIViewController (LibOStyling)
+
+- (void)setTitle:(NSString *)title
+{
+ UILabel *titleView = (UILabel *)self.navigationItem.titleView;
+ if (!titleView) {
+ titleView = [[UILabel alloc] initWithFrame:CGRectZero];
+ titleView.backgroundColor = [UIColor clearColor];
+ titleView.font = [UIFont boldSystemFontOfSize:20.0];
+ titleView.shadowColor = nil;
+
+ titleView.textColor = [UIColor colorWithRed:1.0 green:0.231372549 blue:0.188235294 alpha:1.0];
+
+ self.navigationItem.titleView = titleView;
+ }
+ titleView.text = title;
+ [titleView sizeToFit];
+}
+
+- (void) handleBack
+{
+ [self.navigationController popViewControllerAnimated:YES];
+}
+
+@end
diff --git a/ios/iosremote/iosremote/add.png b/ios/iosremote/iosremote/add.png
new file mode 100644
index 000000000000..94dc1a79182f
--- /dev/null
+++ b/ios/iosremote/iosremote/add.png
Binary files differ
diff --git a/ios/iosremote/iosremote/add@2x.png b/ios/iosremote/iosremote/add@2x.png
new file mode 100644
index 000000000000..473c1021a61d
--- /dev/null
+++ b/ios/iosremote/iosremote/add@2x.png
Binary files differ
diff --git a/ios/iosremote/iosremote/autoDismissKeyboardNavigationViewController.h b/ios/iosremote/iosremote/autoDismissKeyboardNavigationViewController.h
index c51c99f3ae6f..22ab369db3cd 100644
--- a/ios/iosremote/iosremote/autoDismissKeyboardNavigationViewController.h
+++ b/ios/iosremote/iosremote/autoDismissKeyboardNavigationViewController.h
@@ -7,7 +7,8 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#import <UIKit/UIKit.h>
+#import "LibONavigationController.h"
-@interface autoDismissKeyboardNavigationViewController : UINavigationController
+@interface autoDismissKeyboardNavigationViewController : LibONavigationController
@end
diff --git a/ios/iosremote/iosremote/backButton.png b/ios/iosremote/iosremote/backButton.png
new file mode 100644
index 000000000000..8babb852bdd4
--- /dev/null
+++ b/ios/iosremote/iosremote/backButton.png
Binary files differ
diff --git a/ios/iosremote/iosremote/backButton@2x.png b/ios/iosremote/iosremote/backButton@2x.png
new file mode 100644
index 000000000000..e123e62c83ca
--- /dev/null
+++ b/ios/iosremote/iosremote/backButton@2x.png
Binary files differ
diff --git a/ios/iosremote/iosremote/en.lproj/.DS_Store b/ios/iosremote/iosremote/en.lproj/.DS_Store
new file mode 100644
index 000000000000..5008ddfcf53c
--- /dev/null
+++ b/ios/iosremote/iosremote/en.lproj/.DS_Store
Binary files differ
diff --git a/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard b/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard
index 3937a0578172..4135bbc21ab4 100644
--- a/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard
+++ b/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard
@@ -4,16 +4,16 @@
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
</dependencies>
<scenes>
- <!--Server list vc - Connect-->
+ <!--Server list vc - Impress Remote-->
<scene sceneID="5">
<objects>
<viewController id="2" customClass="server_list_vc" sceneMemberID="viewController">
- <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="singleLineEtched" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="naQ-T4-jWV">
+ <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="naQ-T4-jWV">
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="server_item_cell" editingAccessoryType="disclosureIndicator" textLabel="Rg3-PU-OuS" detailTextLabel="9Mc-gD-acc" style="IBUITableViewCellStyleValue1" id="Pvl-Uw-Ghs">
- <rect key="frame" x="0.0" y="46" width="320" height="46"/>
+ <rect key="frame" x="0.0" y="46" 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"/>
@@ -41,8 +41,9 @@
<outlet property="delegate" destination="2" id="owZ-Ow-VEc"/>
</connections>
</tableView>
- <navigationItem key="navigationItem" title="Connect" id="yR1-m8-JWN">
- <barButtonItem key="rightBarButtonItem" systemItem="add" id="bHy-yX-SPg">
+ <navigationItem key="navigationItem" title="Impress Remote" id="yR1-m8-JWN">
+ <barButtonItem key="rightBarButtonItem" image="add.png" style="done" id="bHy-yX-SPg">
+ <color key="tintColor" red="0.92156862745098034" green="0.4392156862745098" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<connections>
<segue destination="maT-Bx-l5y" kind="push" identifier="create_new_server" id="UYr-8d-fk5"/>
</connections>
@@ -98,7 +99,7 @@
</objects>
<point key="canvasLocation" x="80" y="460"/>
</scene>
- <!--New Server View Controller - New Server-->
+ <!--New Server View Controller-->
<scene sceneID="tlJ-c5-Jp2">
<objects>
<tableViewController id="maT-Bx-l5y" customClass="newServerViewController" sceneMemberID="viewController">
@@ -135,13 +136,17 @@
<outlet property="delegate" destination="maT-Bx-l5y" id="Q3h-jf-Kor"/>
</connections>
</tableView>
- <navigationItem key="navigationItem" title="New Server" id="qbR-M4-5O0">
+ <navigationItem key="navigationItem" id="qbR-M4-5O0">
<barButtonItem key="rightBarButtonItem" systemItem="save" id="sqC-Fa-Vem">
+ <color key="tintColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<connections>
<action selector="save:" destination="maT-Bx-l5y" id="OtP-lO-h9g"/>
</connections>
</barButtonItem>
</navigationItem>
+ <connections>
+ <outlet property="saveButton" destination="sqC-Fa-Vem" id="WNw-Nc-CHP"/>
+ </connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="b5I-aN-vyr" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
@@ -497,10 +502,10 @@
</objects>
<point key="canvasLocation" x="604" y="309"/>
</scene>
- <!--Navigation Controller-->
+ <!--LibO Navigation Controller-->
<scene sceneID="yRe-s4-oKK">
<objects>
- <navigationController modalTransitionStyle="flipHorizontal" id="qoG-TN-hN0" sceneMemberID="viewController">
+ <navigationController modalTransitionStyle="flipHorizontal" id="qoG-TN-hN0" customClass="LibONavigationController" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="WJT-Yy-XZ0">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
@@ -518,6 +523,7 @@
</scenes>
<resources>
<image name="Default-568h@2x.png" width="640" height="1136"/>
+ <image name="add.png" width="30" height="30"/>
<image name="ic_launcher@2x.png" width="16" height="16"/>
<image name="pointer.png" width="143" height="147"/>
<image name="pointer_pushed.png" width="143" height="147"/>
@@ -532,6 +538,9 @@
<class className="EditableTableViewCell" superclassName="UITableViewCell">
<source key="sourceIdentifier" type="project" relativePath="./Classes/EditableTableViewCell.h"/>
</class>
+ <class className="LibONavigationController" superclassName="UINavigationController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/LibONavigationController.h"/>
+ </class>
<class className="SWRevealViewController" superclassName="UIViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/SWRevealViewController.h"/>
</class>
@@ -539,6 +548,7 @@
<source key="sourceIdentifier" type="project" relativePath="./Classes/newServerViewController.h"/>
<relationships>
<relationship kind="action" name="save:"/>
+ <relationship kind="outlet" name="saveButton" candidateClass="UIBarButtonItem"/>
</relationships>
</class>
<class className="pinValidation_vc" superclassName="UIViewController">
diff --git a/ios/iosremote/iosremote/gear.png b/ios/iosremote/iosremote/gear.png
new file mode 100644
index 000000000000..2cb8e9eb1e57
--- /dev/null
+++ b/ios/iosremote/iosremote/gear.png
Binary files differ
diff --git a/ios/iosremote/iosremote/gear@2x.png b/ios/iosremote/iosremote/gear@2x.png
new file mode 100644
index 000000000000..c4612f9b36ec
--- /dev/null
+++ b/ios/iosremote/iosremote/gear@2x.png
Binary files differ
diff --git a/ios/iosremote/iosremote/gear_pressed.png b/ios/iosremote/iosremote/gear_pressed.png
new file mode 100644
index 000000000000..12cdd5e6e765
--- /dev/null
+++ b/ios/iosremote/iosremote/gear_pressed.png
Binary files differ
diff --git a/ios/iosremote/iosremote/gear_pressed@2x.png b/ios/iosremote/iosremote/gear_pressed@2x.png
new file mode 100644
index 000000000000..f3e3443140dc
--- /dev/null
+++ b/ios/iosremote/iosremote/gear_pressed@2x.png
Binary files differ
diff --git a/ios/iosremote/iosremote/gear_transparent_bg.png b/ios/iosremote/iosremote/gear_transparent_bg.png
new file mode 100644
index 000000000000..4c8725374e5d
--- /dev/null
+++ b/ios/iosremote/iosremote/gear_transparent_bg.png
Binary files differ
diff --git a/ios/iosremote/iosremote/gear_transparent_bg@2x.png b/ios/iosremote/iosremote/gear_transparent_bg@2x.png
new file mode 100644
index 000000000000..8e1e154c2b6b
--- /dev/null
+++ b/ios/iosremote/iosremote/gear_transparent_bg@2x.png
Binary files differ
diff --git a/ios/iosremote/iosremote/iosremote-Info.plist b/ios/iosremote/iosremote/iosremote-Info.plist
index 8203b179ea39..ce9e5a3f82c1 100644
--- a/ios/iosremote/iosremote/iosremote-Info.plist
+++ b/ios/iosremote/iosremote/iosremote-Info.plist
@@ -15,12 +15,12 @@
<key>CFBundleIconFiles</key>
<array>
<string>iosremote_iphone_icon.png</string>
- <string>iosremote_iphone_icon@2x.png</string>
<string>iosremote_icon.png</string>
<string>iosremote_ipad_icon.png</string>
<string>iosremote_ipad_icon@2x.png</string>
<string>iosremote_ipad_icon@2x_3.png</string>
<string>iosremote_ipad_icon@2x_3.png</string>
+ <string>iosremote_iphone_icon@2x.png</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
diff --git a/ios/iosremote/iosremote/more_icon.png b/ios/iosremote/iosremote/more_icon.png
index 6ad6aeae4068..31e3d8af1f08 100644
--- a/ios/iosremote/iosremote/more_icon.png
+++ b/ios/iosremote/iosremote/more_icon.png
Binary files differ
diff --git a/ios/iosremote/iosremote/more_icon@2x.png b/ios/iosremote/iosremote/more_icon@2x.png
new file mode 100644
index 000000000000..781a99c147e0
--- /dev/null
+++ b/ios/iosremote/iosremote/more_icon@2x.png
Binary files differ
diff --git a/ios/iosremote/iosremote/navBarButtonNormal@2x.png b/ios/iosremote/iosremote/navBarButtonNormal@2x.png
new file mode 100644
index 000000000000..e8c0d3145274
--- /dev/null
+++ b/ios/iosremote/iosremote/navBarButtonNormal@2x.png
Binary files differ
diff --git a/ios/iosremote/iosremote/newServer_vc.h b/ios/iosremote/iosremote/newServer_vc.h
index 72148295d56f..2894238a20d3 100644
--- a/ios/iosremote/iosremote/newServer_vc.h
+++ b/ios/iosremote/iosremote/newServer_vc.h
@@ -33,6 +33,9 @@ typedef NSUInteger ServerAttribute;
@property (nonatomic, strong) EditableTableViewCell *nameCell;
@property (nonatomic, strong) EditableTableViewCell *addrCell;
@property (nonatomic, strong) CommunicationManager *comManager;
+
+@property (weak, nonatomic) IBOutlet UIBarButtonItem *saveButton;
+
- (IBAction)save:(id)sender;
- (EditableTableViewCell *)newDetailCellWithTag:(NSInteger)tag;
diff --git a/ios/iosremote/iosremote/newServer_vc.m b/ios/iosremote/iosremote/newServer_vc.m
index 1ab20c1635a5..d57bb9d7c6c7 100644
--- a/ios/iosremote/iosremote/newServer_vc.m
+++ b/ios/iosremote/iosremote/newServer_vc.m
@@ -9,6 +9,7 @@
#import "newServer_vc.h"
#import "CommunicationManager.h"
#import "EditableTableViewCell.h"
+#import "UIViewController+LibOStyling.h"
#import "serverList_vc.h"
#import "Server.h"
#import <SystemConfiguration/CaptiveNetwork.h>
@@ -74,11 +75,23 @@
return info;
}
+- (void) handleBack
+{
+ [self.navigationController popViewControllerAnimated:YES];
+}
+
- (void)viewDidLoad
{
self.comManager = [CommunicationManager sharedComManager];
[self setNameCell: [self newDetailCellWithTag:ServerName]];
[self setAddrCell: [self newDetailCellWithTag:ServerAddr]];
+
+ [self setTitle:@"New Server"];
+
+ UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Cancel" style:UIBarButtonItemStyleBordered target:self action:@selector(handleBack)];
+ [backButton setBackgroundImage:[UIImage imageNamed:@"backButton"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
+ self.navigationItem.leftBarButtonItem = backButton;
+
}
// Override this method to automatically place the insertion point in the
@@ -137,7 +150,7 @@
//
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
- if ([textField tag] == ServerAddr)
+ if ([textField tag] == ServerName)
{
[textField setReturnKeyType:UIReturnKeyDone];
}
@@ -244,5 +257,9 @@
return cell;
}
+- (void)viewDidUnload {
+ [self setSaveButton:nil];
+ [super viewDidUnload];
+}
@end
diff --git a/ios/iosremote/iosremote/serverList_vc.m b/ios/iosremote/iosremote/serverList_vc.m
index 5344c3dc577e..65ff4097bf92 100644
--- a/ios/iosremote/iosremote/serverList_vc.m
+++ b/ios/iosremote/iosremote/serverList_vc.m
@@ -110,7 +110,6 @@
didRemoveService:(NSNetService *)aNetService
moreComing:(BOOL)moreComing
{
- NSLog(@"Did remove");
[self.comManager.autoDiscoveryServers removeObject:aNetService];
if(!moreComing)
@@ -158,6 +157,9 @@
self.comManager = [CommunicationManager sharedComManager];
self.serverTable.dataSource = self;
self.serverTable.delegate = self;
+
+ [self setTitle:@"Impress Remote"];
+
}
- (void) viewDidAppear:(BOOL)animated
diff --git a/ios/iosremote/iosremote/slideShowPreviewTable_vc_ipad.m b/ios/iosremote/iosremote/slideShowPreviewTable_vc_ipad.m
index 2c2c345d7b81..3787c29b2360 100644
--- a/ios/iosremote/iosremote/slideShowPreviewTable_vc_ipad.m
+++ b/ios/iosremote/iosremote/slideShowPreviewTable_vc_ipad.m
@@ -13,6 +13,7 @@
#import "CommandInterpreter.h"
#import "SlideShow.h"
#import "MainSplitViewController.h"
+#import "UIViewController+LibOStyling.h"
@interface slideShowPreviewTable_vc_ipad ()
@@ -56,6 +57,10 @@
}
NSLog(@"Received: %@", self.comManager.interpreter.slideShow.title);
}];
+
+ UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Connect" style:UIBarButtonItemStyleBordered target:self action:@selector(handleBack)];
+ [backButton setBackgroundImage:[UIImage imageNamed:@"backButton"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
+ self.navigationItem.leftBarButtonItem = backButton;
}
- (void) viewDidAppear:(BOOL)animated
diff --git a/ios/iosremote/iosremote/slideShowPreviewTable_vc_iphone.m b/ios/iosremote/iosremote/slideShowPreviewTable_vc_iphone.m
index fad5f54ed622..3f44b7f4a521 100644
--- a/ios/iosremote/iosremote/slideShowPreviewTable_vc_iphone.m
+++ b/ios/iosremote/iosremote/slideShowPreviewTable_vc_iphone.m
@@ -30,6 +30,10 @@
}
NSLog(@"Received: %@", self.comManager.interpreter.slideShow.title);
}];
+
+ UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Connect" style:UIBarButtonItemStyleBordered target:self action:@selector(handleBack)];
+ [backButton setBackgroundImage:[UIImage imageNamed:@"backButton"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
+ self.navigationItem.leftBarButtonItem = backButton;
}
- (void) viewDidAppear:(BOOL)animated
diff --git a/ios/iosremote/iosremote/slideShowSwipeInList_ipad.m b/ios/iosremote/iosremote/slideShowSwipeInList_ipad.m
index 8847fee4f8c5..7b3d56b7877e 100644
--- a/ios/iosremote/iosremote/slideShowSwipeInList_ipad.m
+++ b/ios/iosremote/iosremote/slideShowSwipeInList_ipad.m
@@ -57,13 +57,6 @@ dispatch_queue_t backgroundQueue;
self.comManager = [CommunicationManager sharedComManager];
self.slideshow.secondaryDelegate = self;
- UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Stop Presentation"
- style:UIBarButtonItemStyleBordered
- target:self
- action:@selector(handleBack:)];
- [backButton setTintColor:[UIColor redColor]];
- self.navigationItem.leftBarButtonItem = backButton;
-
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
self.slideChangedObserver =[center addObserverForName:MSG_SLIDE_CHANGED
diff --git a/ios/iosremote/iosremote/slideShow_vc_iphone.m b/ios/iosremote/iosremote/slideShow_vc_iphone.m
index 42ed69ffb0c6..15a352ab56c4 100644
--- a/ios/iosremote/iosremote/slideShow_vc_iphone.m
+++ b/ios/iosremote/iosremote/slideShow_vc_iphone.m
@@ -6,6 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#import "slideShow_vc_iphone.h"
+#import "PopoverView.h"
#import "SlideShow.h"
#import "UIViewTransitionCategory.h"
#import "CommunicationManager.h"
@@ -24,7 +25,7 @@
#define TOUCH_POINTER_VIEW 3
#define CURRENT_SLIDE_NOTES 4
-@interface slideShow_vc ()
+@interface slideShow_vc () <PopoverViewDelegate>
@property (nonatomic, strong) CommunicationManager *comManager;
@property (nonatomic, strong) id slideShowImageNoteReadyObserver;
@@ -284,12 +285,11 @@
[self.slideshow getContentAtIndex:self.slideshow.currentSlide forView:self.touchPointerImage];
[self.slideNumber setText:[NSString stringWithFormat:@"%u/%u", [self.slideshow currentSlide]+1, [self.slideshow size]]];
-
- UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Stop Presentation"
+ UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"gear_transparent_bg"]
style:UIBarButtonItemStyleBordered
target:self
- action:@selector(handleBack:)];
- [backButton setTintColor:[UIColor redColor]];
+ action:@selector(popOverStart:)];
+
self.revealViewController.navigationItem.rightBarButtonItem = backButton;
self.revealButtonItem = [[UIBarButtonItem alloc] initWithImage: [UIImage imageNamed:@"more_icon.png"]
@@ -313,10 +313,13 @@
}
}
-- (void) handleBack:(id)sender
+- (void) popOverStart:(id)sender
{
- [self.comManager.transmitter stopPresentation];
- [self.navigationController popViewControllerAnimated:YES];
+ if (!isBlank) {
+ [PopoverView showPopoverAtPoint: CGPointMake(self.navigationController.view.frame.size.width - 20, 0) inView:self.view withTitle:@"More" withStringArray:[NSArray arrayWithObjects:@"Stop Presentation", @"Restart", @"Blank Screen", nil] delegate:self];
+ } else {
+ [PopoverView showPopoverAtPoint: CGPointMake(self.navigationController.view.frame.size.width - 20, 0) inView:self.view withTitle:@"More" withStringArray:[NSArray arrayWithObjects:@"Stop Presentation", @"Restart", @"Resume from blank screen", nil] delegate:self];
+ }
}
- (void) viewWillAppear:(BOOL)animated
@@ -399,6 +402,7 @@
[super viewDidUnload];
}
+#pragma mark - Slides Control
- (IBAction)nextSlideAction:(id)sender {
[[self.comManager transmitter] nextTransition];
}
@@ -407,4 +411,33 @@
[[self.comManager transmitter] previousTransition];
}
+static BOOL isBlank = NO;
+#pragma mark - PopOver delegates
+- (void) popoverView:(PopoverView *)popoverView didSelectItemAtIndex:(NSInteger)index
+{
+ [popoverView dismiss];
+ switch (index) {
+ case 0:
+ // Stop Presentation
+ [self.comManager.transmitter stopPresentation];
+ [self.navigationController popViewControllerAnimated:YES];
+ break;
+ case 1:
+ [self.comManager.transmitter gotoSlide:0];
+ break;
+ case 2:
+ if (!isBlank) {
+ [self.comManager.transmitter blankScreen];
+ } else {
+ [self.comManager.transmitter resume];
+ }
+ isBlank = !isBlank;
+ break;
+ default:
+ NSLog(@"Pop over didSelectItemAtIndex out of bound, should not happen");
+ break;
+ }
+}
+
+
@end
diff --git a/ios/iosremote/iosremote_ipad_icon.png b/ios/iosremote/iosremote_ipad_icon.png
index 859d53a87941..33dda09636b9 100644
--- a/ios/iosremote/iosremote_ipad_icon.png
+++ b/ios/iosremote/iosremote_ipad_icon.png
Binary files differ
diff --git a/ios/iosremote/iosremote_ipad_icon@2x.png b/ios/iosremote/iosremote_ipad_icon@2x.png
index 9c1da2a53a8d..1fce03ca7f18 100644
--- a/ios/iosremote/iosremote_ipad_icon@2x.png
+++ b/ios/iosremote/iosremote_ipad_icon@2x.png
Binary files differ
diff --git a/ios/iosremote/iosremote_iphone_icon.png b/ios/iosremote/iosremote_iphone_icon.png
index e976b082bc01..84e23cd5809b 100644
--- a/ios/iosremote/iosremote_iphone_icon.png
+++ b/ios/iosremote/iosremote_iphone_icon.png
Binary files differ
diff --git a/ios/iosremote/iosremote_iphone_icon@2x.png b/ios/iosremote/iosremote_iphone_icon@2x.png
index cb045bc0cf56..c3a41c22bed6 100644
--- a/ios/iosremote/iosremote_iphone_icon@2x.png
+++ b/ios/iosremote/iosremote_iphone_icon@2x.png
Binary files differ
diff --git a/ios/iosremote/navBarBackground.png b/ios/iosremote/navBarBackground.png
new file mode 100644
index 000000000000..53480551dc2f
--- /dev/null
+++ b/ios/iosremote/navBarBackground.png
Binary files differ
diff --git a/ios/iosremote/navBarBackground@2x.png b/ios/iosremote/navBarBackground@2x.png
new file mode 100644
index 000000000000..d18e81e92f17
--- /dev/null
+++ b/ios/iosremote/navBarBackground@2x.png
Binary files differ