From cc2075e8afcea0b64296851346d4e221782664df Mon Sep 17 00:00:00 2001 From: Siqi LIU Date: Sat, 7 Sep 2013 22:23:22 +0200 Subject: UI changes for countdown Timer in storyboard Change-Id: I9998cadd21b2c3b35edb588f286134c1902495ba --- ios/iosremote/iosremote.xcodeproj/project.pbxproj | 36 +++++---- ios/iosremote/iosremote/TimerCountdownTimePicker.h | 6 ++ ios/iosremote/iosremote/TimerCountdownTimePicker.m | 83 +++++++++++++++++--- .../iosremote/en.lproj/iPhone_autoSize.storyboard | 85 ++++----------------- .../en.lproj/iPhone_autoSize_old.storyboard | 15 +++- .../iosremote/fr.lproj/iPhone_autoSize.storyboard | 15 +++- .../fr.lproj/iPhone_autoSize_old.storyboard | 15 +++- ios/iosremote/iosremote/gear.png | Bin 3545 -> 0 bytes ios/iosremote/iosremote/gear@2x.png | Bin 4689 -> 0 bytes ios/iosremote/iosremote/gear_pressed.png | Bin 3459 -> 0 bytes ios/iosremote/iosremote/gear_pressed@2x.png | Bin 4409 -> 0 bytes .../iosremote/slideShowSwipeInList_iphone.h | 2 + .../iosremote/slideShowSwipeInList_iphone.m | 19 ++++- ios/iosremote/iosremote/slideShow_vc_iphone.m | 2 + .../zh-Hans.lproj/iPhone_autoSize.storyboard | 15 +++- .../zh-Hans.lproj/iPhone_autoSize_old.storyboard | 15 +++- 16 files changed, 203 insertions(+), 105 deletions(-) delete mode 100644 ios/iosremote/iosremote/gear.png delete mode 100644 ios/iosremote/iosremote/gear@2x.png delete mode 100644 ios/iosremote/iosremote/gear_pressed.png delete mode 100644 ios/iosremote/iosremote/gear_pressed@2x.png (limited to 'ios') diff --git a/ios/iosremote/iosremote.xcodeproj/project.pbxproj b/ios/iosremote/iosremote.xcodeproj/project.pbxproj index cc25b6c10d45..aa42d9c073b7 100644 --- a/ios/iosremote/iosremote.xcodeproj/project.pbxproj +++ b/ios/iosremote/iosremote.xcodeproj/project.pbxproj @@ -76,10 +76,6 @@ 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 */; }; @@ -88,6 +84,10 @@ 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 */; }; 8C23B46917DA158C00FB4DE6 /* UIView+Shadowing.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C23B46817DA158C00FB4DE6 /* UIView+Shadowing.m */; }; + 8C23B46C17DB3B8600FB4DE6 /* timer_settime_btn.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C23B46A17DB3B8600FB4DE6 /* timer_settime_btn.png */; }; + 8C23B46D17DB3B8600FB4DE6 /* timer_settime_btn@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C23B46B17DB3B8600FB4DE6 /* timer_settime_btn@2x.png */; }; + 8C23B47017DB419300FB4DE6 /* Timer.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C23B46F17DB419300FB4DE6 /* Timer.m */; }; + 8C23B47317DBAFD200FB4DE6 /* TimerCountdownTimePicker.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C23B47217DBAFD200FB4DE6 /* TimerCountdownTimePicker.m */; }; 8C26E5C617A5539D007DA4B7 /* UserDefaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8C26E5C517A5539D007DA4B7 /* UserDefaults.plist */; }; 8C26E5C917A5731D007DA4B7 /* autoDismissKeyboardNavigationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C26E5C817A5731D007DA4B7 /* autoDismissKeyboardNavigationViewController.m */; }; 8C26E5D017A58703007DA4B7 /* HorizontalSlideCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C26E5CF17A58703007DA4B7 /* HorizontalSlideCell.m */; }; @@ -230,10 +230,6 @@ 8C19F43717B145AD005BDB61 /* backButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backButton.png; path = iosremote/backButton.png; sourceTree = ""; }; 8C19F43817B145AD005BDB61 /* backButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "backButton@2x.png"; path = "iosremote/backButton@2x.png"; sourceTree = ""; }; 8C19F43C17B1D935005BDB61 /* add.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = add.png; path = iosremote/add.png; sourceTree = ""; }; - 8C19F43F17B1E961005BDB61 /* gear.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = gear.png; path = iosremote/gear.png; sourceTree = ""; }; - 8C19F44017B1E961005BDB61 /* gear@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "gear@2x.png"; path = "iosremote/gear@2x.png"; sourceTree = ""; }; - 8C19F44317B1F21B005BDB61 /* gear_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = gear_pressed.png; path = iosremote/gear_pressed.png; sourceTree = ""; }; - 8C19F44417B1F21B005BDB61 /* gear_pressed@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "gear_pressed@2x.png"; path = "iosremote/gear_pressed@2x.png"; sourceTree = ""; }; 8C19F44817B1FEFD005BDB61 /* gear_transparent_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = gear_transparent_bg.png; path = iosremote/gear_transparent_bg.png; sourceTree = ""; }; 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 = ""; }; 8C19F44C17B20426005BDB61 /* add@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "add@2x.png"; path = "iosremote/add@2x.png"; sourceTree = ""; }; @@ -243,6 +239,12 @@ 8C1A170017A2854300B4BB3C /* iosremote_ipad_icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "iosremote_ipad_icon@2x.png"; sourceTree = ""; }; 8C23B46717DA158C00FB4DE6 /* UIView+Shadowing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Shadowing.h"; sourceTree = ""; }; 8C23B46817DA158C00FB4DE6 /* UIView+Shadowing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Shadowing.m"; sourceTree = ""; }; + 8C23B46A17DB3B8600FB4DE6 /* timer_settime_btn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = timer_settime_btn.png; path = iosremote/timer_settime_btn.png; sourceTree = ""; }; + 8C23B46B17DB3B8600FB4DE6 /* timer_settime_btn@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "timer_settime_btn@2x.png"; path = "iosremote/timer_settime_btn@2x.png"; sourceTree = ""; }; + 8C23B46E17DB419300FB4DE6 /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Timer.h; path = iosremote/Timer.h; sourceTree = ""; }; + 8C23B46F17DB419300FB4DE6 /* Timer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Timer.m; path = iosremote/Timer.m; sourceTree = ""; }; + 8C23B47117DBAFD200FB4DE6 /* TimerCountdownTimePicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TimerCountdownTimePicker.h; path = iosremote/TimerCountdownTimePicker.h; sourceTree = ""; }; + 8C23B47217DBAFD200FB4DE6 /* TimerCountdownTimePicker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TimerCountdownTimePicker.m; path = iosremote/TimerCountdownTimePicker.m; sourceTree = ""; }; 8C26E5BE17A525FC007DA4B7 /* MGSplitCornersView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGSplitCornersView.h; sourceTree = ""; }; 8C26E5BF17A525FC007DA4B7 /* MGSplitCornersView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGSplitCornersView.m; sourceTree = ""; }; 8C26E5C017A525FC007DA4B7 /* MGSplitDividerView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGSplitDividerView.h; sourceTree = ""; }; @@ -420,6 +422,8 @@ 8C06B31917B7EC62002F5CF8 /* assets */ = { isa = PBXGroup; children = ( + 8C23B46A17DB3B8600FB4DE6 /* timer_settime_btn.png */, + 8C23B46B17DB3B8600FB4DE6 /* timer_settime_btn@2x.png */, 8CAF3DE117D1D5D600F931E5 /* more_ipad.png */, 8CAF3DE217D1D5D700F931E5 /* more_ipad@2x.png */, 8CAF3DDD17D0DFFD00F931E5 /* WTcontrol~ipad.png */, @@ -436,10 +440,6 @@ 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 */, @@ -577,6 +577,8 @@ 8C19F42E17B05089005BDB61 /* LibONavigationController.m */, 8C19F43417B10D48005BDB61 /* UIViewController+LibOStyling.h */, 8C19F43517B10D49005BDB61 /* UIViewController+LibOStyling.m */, + 8C23B47117DBAFD200FB4DE6 /* TimerCountdownTimePicker.h */, + 8C23B47217DBAFD200FB4DE6 /* TimerCountdownTimePicker.m */, ); name = Support; sourceTree = ""; @@ -598,6 +600,8 @@ 57B7625C17621E42007703F6 /* SlideShow.m */, 57B1529D176486C300EECC67 /* CommandTransmitter.h */, 57B1529E176486C300EECC67 /* CommandTransmitter.m */, + 8C23B46E17DB419300FB4DE6 /* Timer.h */, + 8C23B46F17DB419300FB4DE6 /* Timer.m */, ); name = Models; sourceTree = ""; @@ -781,10 +785,6 @@ 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 */, @@ -805,6 +805,8 @@ 8CAF3DE017D0DFFD00F931E5 /* WTcontrol~iphone.png in Resources */, 8CAF3DE317D1D5D700F931E5 /* more_ipad.png in Resources */, 8CAF3DE417D1D5D700F931E5 /* more_ipad@2x.png in Resources */, + 8C23B46C17DB3B8600FB4DE6 /* timer_settime_btn.png in Resources */, + 8C23B46D17DB3B8600FB4DE6 /* timer_settime_btn@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -868,6 +870,8 @@ 8CD6EC6817CBBAF40071827A /* WalkThroughPageViewController.m in Sources */, 8CD6EC7017CC3FA00071827A /* WalkThroughContainerViewController.m in Sources */, 8C23B46917DA158C00FB4DE6 /* UIView+Shadowing.m in Sources */, + 8C23B47017DB419300FB4DE6 /* Timer.m in Sources */, + 8C23B47317DBAFD200FB4DE6 /* TimerCountdownTimePicker.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/ios/iosremote/iosremote/TimerCountdownTimePicker.h b/ios/iosremote/iosremote/TimerCountdownTimePicker.h index b9853c798464..a0b94083742d 100644 --- a/ios/iosremote/iosremote/TimerCountdownTimePicker.h +++ b/ios/iosremote/iosremote/TimerCountdownTimePicker.h @@ -10,4 +10,10 @@ @interface TimerCountdownTimePicker : UIView +@property (nonatomic, assign, readonly) UIDatePicker *picker; + +- (void) setMode: (UIDatePickerMode) mode; +- (void) setHidden: (BOOL) hidden animated: (BOOL) animated; +- (void) addTargetForDoneButton: (id) target action: (SEL) action; + @end diff --git a/ios/iosremote/iosremote/TimerCountdownTimePicker.m b/ios/iosremote/iosremote/TimerCountdownTimePicker.m index d35757959301..dbae01859018 100644 --- a/ios/iosremote/iosremote/TimerCountdownTimePicker.m +++ b/ios/iosremote/iosremote/TimerCountdownTimePicker.m @@ -7,25 +7,84 @@ // #import "TimerCountdownTimePicker.h" +#import + +#define MyDateTimePickerHeight 260 +#define TimerCountdownTimePickerPickerHeight 216 +#define TimerCountdownTimePickerToolbarHeight 44 + +@interface TimerCountdownTimePicker() + +@property (nonatomic, assign, readwrite) UIDatePicker *picker; +@property (nonatomic, assign) CGRect originalFrame; + +@property (nonatomic, assign) id doneTarget; +@property (nonatomic, assign) SEL doneSelector; + +- (void) donePressed; + +@end + @implementation TimerCountdownTimePicker -- (id)initWithFrame:(CGRect)frame -{ - self = [super initWithFrame:frame]; - if (self) { - // Initialization code +@synthesize picker = _picker; +@synthesize originalFrame = _originalFrame; + +@synthesize doneTarget = _doneTarget; +@synthesize doneSelector = _doneSelector; + +- (id) initWithFrame: (CGRect) frame { + if ((self = [super initWithFrame: frame])) { + self.originalFrame = frame; + self.backgroundColor = [UIColor clearColor]; + + CGFloat width = self.bounds.size.width; + UIDatePicker *picker = [[UIDatePicker alloc] initWithFrame: CGRectMake(0, 0, width, TimerCountdownTimePickerPickerHeight)]; + [self addSubview: picker]; + + UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame: CGRectMake(0, TimerCountdownTimePickerPickerHeight, width, TimerCountdownTimePickerToolbarHeight)]; + toolbar.barStyle = UIBarStyleBlackOpaque; + + UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithTitle: NSLocalizedString(@"Done", @"Done button in the time picker for count down time picker") style: UIBarButtonItemStyleBordered target: self action: @selector(donePressed)]; + doneButton.width = width - 20; + toolbar.items = [NSArray arrayWithObject: doneButton]; + [self addSubview: toolbar]; + + self.picker = picker; } return self; } -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect -{ - // Drawing code +- (void) setMode: (UIDatePickerMode) mode { + self.picker.datePickerMode = mode; +} + +- (void) donePressed { + if (self.doneTarget) { + [self.doneTarget performSelector: self.doneSelector]; + } +} + +- (void) addTargetForDoneButton: (id) target action: (SEL) action { + self.doneTarget = target; + self.doneSelector = action; +} + +- (void) setHidden: (BOOL) hidden animated: (BOOL) animated { + CGRect newFrame = self.originalFrame; + newFrame.origin.y += hidden ? MyDateTimePickerHeight : 0; + if (animated) { + [UIView beginAnimations: @"animateDateTimePicker" context: nil]; + [UIView setAnimationDuration: 0.3]; + [UIView setAnimationCurve: UIViewAnimationCurveEaseOut]; + + self.frame = newFrame; + + [UIView commitAnimations]; + } else { + self.frame = newFrame; + } } -*/ @end diff --git a/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard b/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard index dd2302514dfc..edc3083b3210 100644 --- a/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard +++ b/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard @@ -204,7 +204,7 @@ - + @@ -281,6 +281,18 @@ + @@ -593,78 +605,9 @@ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/iosremote/iosremote/en.lproj/iPhone_autoSize_old.storyboard b/ios/iosremote/iosremote/en.lproj/iPhone_autoSize_old.storyboard index 6e238d7d8d27..edc3083b3210 100644 --- a/ios/iosremote/iosremote/en.lproj/iPhone_autoSize_old.storyboard +++ b/ios/iosremote/iosremote/en.lproj/iPhone_autoSize_old.storyboard @@ -204,7 +204,7 @@ - + @@ -281,6 +281,18 @@ + @@ -593,6 +605,7 @@ + diff --git a/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize.storyboard b/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize.storyboard index 720e3ed866da..8825a870a220 100644 --- a/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize.storyboard +++ b/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize.storyboard @@ -206,7 +206,7 @@ Contrôle Distant - + @@ -283,6 +283,18 @@ Contrôle Distant + @@ -595,6 +607,7 @@ Contrôle Distant + diff --git a/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize_old.storyboard b/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize_old.storyboard index 720e3ed866da..8825a870a220 100644 --- a/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize_old.storyboard +++ b/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize_old.storyboard @@ -206,7 +206,7 @@ Contrôle Distant - + @@ -283,6 +283,18 @@ Contrôle Distant + @@ -595,6 +607,7 @@ Contrôle Distant + diff --git a/ios/iosremote/iosremote/gear.png b/ios/iosremote/iosremote/gear.png deleted file mode 100644 index 2cb8e9eb1e57..000000000000 Binary files a/ios/iosremote/iosremote/gear.png and /dev/null differ diff --git a/ios/iosremote/iosremote/gear@2x.png b/ios/iosremote/iosremote/gear@2x.png deleted file mode 100644 index c4612f9b36ec..000000000000 Binary files a/ios/iosremote/iosremote/gear@2x.png and /dev/null differ diff --git a/ios/iosremote/iosremote/gear_pressed.png b/ios/iosremote/iosremote/gear_pressed.png deleted file mode 100644 index 12cdd5e6e765..000000000000 Binary files a/ios/iosremote/iosremote/gear_pressed.png and /dev/null differ diff --git a/ios/iosremote/iosremote/gear_pressed@2x.png b/ios/iosremote/iosremote/gear_pressed@2x.png deleted file mode 100644 index f3e3443140dc..000000000000 Binary files a/ios/iosremote/iosremote/gear_pressed@2x.png and /dev/null differ diff --git a/ios/iosremote/iosremote/slideShowSwipeInList_iphone.h b/ios/iosremote/iosremote/slideShowSwipeInList_iphone.h index 2ba829802055..a71d57bba6b9 100644 --- a/ios/iosremote/iosremote/slideShowSwipeInList_iphone.h +++ b/ios/iosremote/iosremote/slideShowSwipeInList_iphone.h @@ -8,9 +8,11 @@ #import @class stopWatch; +@class Timer; @interface slideShowSwipeInList : UITableViewController @property (nonatomic, strong) stopWatch *stopWatch; +@property (nonatomic, strong) Timer *timer; @end diff --git a/ios/iosremote/iosremote/slideShowSwipeInList_iphone.m b/ios/iosremote/iosremote/slideShowSwipeInList_iphone.m index bc405780288a..2424e101978d 100644 --- a/ios/iosremote/iosremote/slideShowSwipeInList_iphone.m +++ b/ios/iosremote/iosremote/slideShowSwipeInList_iphone.m @@ -15,8 +15,10 @@ #import "slideShowPreviewTable_vc.h" #import "ControlVariables.h" #import "stopWatch.h" +#import "Timer.h" #import "UIImageView+setImageAnimated.h" #import "UIView+Shadowing.h" +#import "UIViewController+LibOStyling.h" #import #import @@ -33,6 +35,8 @@ @synthesize comManager = _comManager; @synthesize currentPage = _currentPage; @synthesize slideshow = _slideshow; +@synthesize timer = _timer; +@synthesize stopWatch = _stopWatch; dispatch_queue_t backgroundQueue; @@ -54,6 +58,8 @@ dispatch_queue_t backgroundQueue; [self.stopWatch start]; } + self.timer = [[Timer alloc] init]; + self.tableView.backgroundColor = [UIColor colorWithRed:.674509804 green:.729411765 blue:.760784314 alpha:1.0]; } @@ -62,9 +68,14 @@ dispatch_queue_t backgroundQueue; if (!self.stopWatch.set) { [self.stopWatch setupWithTableViewCell:[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]]; } + if (!self.timer.set) { + [self.timer setupWithTableViewCell:[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]]; + } [self.stopWatch updateStartButtonIcon]; + [self.timer updateStartButtonIcon]; if ([self.comManager.interpreter.slideShow size] > 0) { [self.stopWatch updateStartButtonIcon]; + [self.timer updateStartButtonIcon]; NSIndexPath *indexPath = [NSIndexPath indexPathForRow:self.slideshow.currentSlide inSection:1]; [self.tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone]; @@ -193,7 +204,7 @@ dispatch_queue_t backgroundQueue; [view setShadow]; UIScrollView * scroll = (UIScrollView *) [cell viewWithTag:7]; - scroll.contentSize = CGSizeMake(417,120); + scroll.contentSize = CGSizeMake(412, 120); return cell; } else { static NSString *CellIdentifier = @"slide"; @@ -236,6 +247,7 @@ dispatch_queue_t backgroundQueue; - (void)viewDidUnload { [self setStopWatch:nil]; + [self setTimer:nil]; [super viewDidUnload]; } @@ -260,9 +272,14 @@ dispatch_queue_t backgroundQueue; switch (page) { case 0: [label setText:NSLocalizedString(@"Stop Watch", @"Sidebar section header")]; + [self.revealViewController setTitle:@""]; + [self.revealViewController setOwner:STOPWATCH]; break; case 1: [label setText:NSLocalizedString(@"Timer", @"Sidebar section header")]; + [self.revealViewController setTitle:@""]; + [self.revealViewController setOwner:TIMER]; + break; default: break; } diff --git a/ios/iosremote/iosremote/slideShow_vc_iphone.m b/ios/iosremote/iosremote/slideShow_vc_iphone.m index 577b1171819f..29882527654d 100644 --- a/ios/iosremote/iosremote/slideShow_vc_iphone.m +++ b/ios/iosremote/iosremote/slideShow_vc_iphone.m @@ -351,6 +351,8 @@ NSOperationQueue *mainQueue = [NSOperationQueue mainQueue]; [[(slideShowSwipeInList *)self.revealViewController.rearViewController stopWatch] setDelegate:self.revealViewController]; + + [[(slideShowSwipeInList *)self.revealViewController.rearViewController timer] setDelegate:self.revealViewController]; self.slideShowImageNoteReadyObserver =[center addObserverForName:MSG_SLIDE_CHANGED object:nil diff --git a/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize.storyboard b/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize.storyboard index 3f906d03eb31..d75f29357a64 100644 --- a/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize.storyboard +++ b/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize.storyboard @@ -204,7 +204,7 @@ - + @@ -281,6 +281,18 @@ + @@ -593,6 +605,7 @@ + diff --git a/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize_old.storyboard b/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize_old.storyboard index 3f906d03eb31..d75f29357a64 100644 --- a/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize_old.storyboard +++ b/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize_old.storyboard @@ -204,7 +204,7 @@ - + @@ -281,6 +281,18 @@ + @@ -593,6 +605,7 @@ + -- cgit