diff options
author | Siqi LIU <me@siqi.fr> | 2013-09-21 16:13:07 +0200 |
---|---|---|
committer | Siqi LIU <me@siqi.fr> | 2013-09-21 16:16:24 +0200 |
commit | 6d29bafee442ebb2a60da4dfe8f4b5f63eb04b0d (patch) | |
tree | 10629615265fd1ab44a008824a30f41038aaa00a /ios | |
parent | b95acb2bdcc6bc7c09a806157361c83142858d97 (diff) |
iOS datepicker background issues
Change-Id: I532d3b854ff3b66048b40decd2d9232ab9720151
Diffstat (limited to 'ios')
14 files changed, 32 insertions, 28 deletions
diff --git a/ios/iosremote/SWRevealViewController/SWRevealViewController.m b/ios/iosremote/SWRevealViewController/SWRevealViewController.m index feab034b3cee..de861f66ed0c 100755 --- a/ios/iosremote/SWRevealViewController/SWRevealViewController.m +++ b/ios/iosremote/SWRevealViewController/SWRevealViewController.m @@ -404,7 +404,7 @@ const int FrontViewPositionNone = 0xff; } CGRect toolbarTargetFrame = CGRectMake(0, self.view.bounds.size.height-216-44, 320, 44); CGRect datePickerTargetFrame = CGRectMake(0, self.view.bounds.size.height-216, 320, 216); - + UIView *darkView = [[UIView alloc] initWithFrame:self.view.bounds]; darkView.alpha = 0; darkView.backgroundColor = [UIColor blackColor]; @@ -412,9 +412,11 @@ const int FrontViewPositionNone = 0xff; UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissDatePicker:)]; [darkView addGestureRecognizer:tapGesture]; [self.view addSubview:darkView]; + darkView.alpha = 0.5; UIDatePicker *datePicker = [[UIDatePicker alloc] initWithFrame:CGRectMake(0, self.view.bounds.size.height+44, 320, 216)]; datePicker.tag = 90; + datePicker.backgroundColor = [UIColor whiteColor]; [datePicker setDatePickerMode:UIDatePickerModeCountDownTimer]; [datePicker addTarget:self action:@selector(changeDate:) forControlEvents:UIControlEventValueChanged]; [self.view addSubview:datePicker]; @@ -430,7 +432,7 @@ const int FrontViewPositionNone = 0xff; [UIView beginAnimations:@"MoveIn" context:nil]; toolBar.frame = toolbarTargetFrame; datePicker.frame = datePickerTargetFrame; - darkView.alpha = 0.5; + [UIView commitAnimations]; } diff --git a/ios/iosremote/en.lproj/iPad_autosize.storyboard b/ios/iosremote/en.lproj/iPad_autosize.storyboard index 963d990e7dad..da90368ad97a 100644 --- a/ios/iosremote/en.lproj/iPad_autosize.storyboard +++ b/ios/iosremote/en.lproj/iPad_autosize.storyboard @@ -623,11 +623,9 @@ </scenes> <resources> <image name="Default.png" width="320" height="480"/> - <image name="Default.png" width="320" height="480"/> <image name="WTPairingScreenshot.png" width="474" height="312"/> <image name="add.png" width="30" height="30"/> <image name="buttonBackground.png" width="45" height="45"/> - <image name="buttonBackground.png" width="45" height="45"/> <image name="more_icon.png" width="30" height="30"/> <image name="more_ipad.png" width="60" height="60"/> <image name="nextButton_normal.png" width="42" height="230"/> @@ -635,10 +633,8 @@ <image name="previousButton_normal.png" width="42" height="230"/> <image name="previousButton_pressed.png" width="42" height="230"/> <image name="timer_clear_btn_dark.png" width="60" height="60"/> - <image name="timer_clear_btn_dark.png" width="60" height="60"/> <image name="timer_settime_btn.png" width="60" height="60"/> <image name="timer_start_btn_dark.png" width="60" height="60"/> - <image name="timer_start_btn_dark.png" width="60" height="60"/> </resources> <color key="tintColor" red="1" green="0.50196078430000002" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <simulatedMetricsContainer key="defaultSimulatedMetrics"> diff --git a/ios/iosremote/en.lproj/iPad_autosize_old.storyboard b/ios/iosremote/en.lproj/iPad_autosize_old.storyboard index 963d990e7dad..da90368ad97a 100644 --- a/ios/iosremote/en.lproj/iPad_autosize_old.storyboard +++ b/ios/iosremote/en.lproj/iPad_autosize_old.storyboard @@ -623,11 +623,9 @@ </scenes> <resources> <image name="Default.png" width="320" height="480"/> - <image name="Default.png" width="320" height="480"/> <image name="WTPairingScreenshot.png" width="474" height="312"/> <image name="add.png" width="30" height="30"/> <image name="buttonBackground.png" width="45" height="45"/> - <image name="buttonBackground.png" width="45" height="45"/> <image name="more_icon.png" width="30" height="30"/> <image name="more_ipad.png" width="60" height="60"/> <image name="nextButton_normal.png" width="42" height="230"/> @@ -635,10 +633,8 @@ <image name="previousButton_normal.png" width="42" height="230"/> <image name="previousButton_pressed.png" width="42" height="230"/> <image name="timer_clear_btn_dark.png" width="60" height="60"/> - <image name="timer_clear_btn_dark.png" width="60" height="60"/> <image name="timer_settime_btn.png" width="60" height="60"/> <image name="timer_start_btn_dark.png" width="60" height="60"/> - <image name="timer_start_btn_dark.png" width="60" height="60"/> </resources> <color key="tintColor" red="1" green="0.50196078430000002" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <simulatedMetricsContainer key="defaultSimulatedMetrics"> diff --git a/ios/iosremote/iosremote/Classes/BasePresentationViewController.m b/ios/iosremote/iosremote/Classes/BasePresentationViewController.m index 8f58f5314602..04f68af56d55 100644 --- a/ios/iosremote/iosremote/Classes/BasePresentationViewController.m +++ b/ios/iosremote/iosremote/Classes/BasePresentationViewController.m @@ -565,7 +565,6 @@ static BOOL isBlank = NO; popoverView.backgroundColor = [UIColor blackColor]; UIDatePicker *datePicker=[[UIDatePicker alloc]init];//Date picker - datePicker.frame=CGRectMake(0,44,320, 216); datePicker.datePickerMode = UIDatePickerModeCountDownTimer; [datePicker setTag:10]; [datePicker addTarget:self action:@selector(changeDate:) forControlEvents:UIControlEventValueChanged]; @@ -575,7 +574,12 @@ static BOOL isBlank = NO; self.popoverTimePickerController = [[UIPopoverController alloc] initWithContentViewController:popoverContent]; self.popoverTimePickerController.delegate = self; - [self.popoverTimePickerController setPopoverContentSize:CGSizeMake(320, 264) animated:NO]; + // iOS7's time picker has default clearcolor background + if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) { + datePicker.backgroundColor = [UIColor whiteColor]; + } + datePicker.frame=CGRectMake(0,0,320, 216); + [self.popoverTimePickerController setPopoverContentSize:CGSizeMake(320, 216) animated:NO]; [self.popoverTimePickerController presentPopoverFromRect:self.timerSetTimeButton.frame inView:self.timerView permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES]; } diff --git a/ios/iosremote/iosremote/Classes/ServerListViewController.m b/ios/iosremote/iosremote/Classes/ServerListViewController.m index e9e65836a257..76b2565f9a43 100644 --- a/ios/iosremote/iosremote/Classes/ServerListViewController.m +++ b/ios/iosremote/iosremote/Classes/ServerListViewController.m @@ -236,12 +236,6 @@ - (void)viewDidLoad { [super viewDidLoad]; - // Uncomment the following line to preserve selection between presentations. - // self.clearsSelectionOnViewWillAppear = NO; - - // Uncomment the following line to display an Edit button in the navigation bar for this view controller. - // self.navigationItem.rightBarButtonItem = self.editButtonItem; - self.center = [NSNotificationCenter defaultCenter]; self.comManager = [CommunicationManager sharedComManager]; diff --git a/ios/iosremote/iosremote/Classes/StopWatch.h b/ios/iosremote/iosremote/Classes/StopWatch.h index 0c4c5c5ed90d..caeacdda84e6 100644 --- a/ios/iosremote/iosremote/Classes/StopWatch.h +++ b/ios/iosremote/iosremote/Classes/StopWatch.h @@ -18,6 +18,10 @@ @end +/** + This class controls the behavior of stopwatch timing widget. + **/ + @interface StopWatch : NSObject // StopWatch @@ -26,13 +30,18 @@ @property BOOL set; @property (weak, nonatomic) id<StopWatchDelegate> delegate; +// initialzie Stopwatch with relative UIButton/UILabel elements - (StopWatch *) initWithStartButton:(UIButton *)startButton ClearButton:(UIButton *)clearButton TimeLabel:(UILabel *)timeLabel; +// initialzie Stopwatch with a tableviewCell which contains relative UIButton/UILabel elements - (void) setupWithTableViewCell:(UITableViewCell *)cell; +// Start/Pause/Resume the stopwatch - (void) start; +// Stop the stopwatch and update seconds left to its original value - (void) clear; +// Keep start button icon up-to-date with respect to its current state - (void) updateStartButtonIcon; @end diff --git a/ios/iosremote/iosremote/Communication/Client.h b/ios/iosremote/iosremote/Communication/Client.h index 12a36419c781..cc01ee5f4903 100644 --- a/ios/iosremote/iosremote/Communication/Client.h +++ b/ios/iosremote/iosremote/Communication/Client.h @@ -19,18 +19,20 @@ @property (nonatomic, strong) NSString* name; @property (nonatomic, strong) Server* server; +// Connect to the server stored in [server] - (void) connect; +// Disconnect from server - (void) disconnect; - - (id) initWithServer:(Server*)server managedBy:(CommunicationManager*)manager interpretedBy:(CommandInterpreter*)receiver; - +// Send a command (command by transmitter) to the server, base64 encoded - (void) sendCommand:(NSString *)aCommand; - +// Attempt to connect with a time out. - (void)startConnectionTimeoutTimerwithInterval:(double) interval; +// Stop connection timeout timer - (void)stopConnectionTimeoutTimer; - +// Delegate method, handle stream events and transfer events to CommandInterpreter -(void)stream:(NSStream *)stream handleEvent:(NSStreamEvent)eventCode; @end
\ No newline at end of file diff --git a/ios/iosremote/iosremote/Communication/CommunicationManager.h b/ios/iosremote/iosremote/Communication/CommunicationManager.h index 1e24503bd8b8..20a89d9adbd1 100644 --- a/ios/iosremote/iosremote/Communication/CommunicationManager.h +++ b/ios/iosremote/iosremote/Communication/CommunicationManager.h @@ -62,6 +62,7 @@ enum ConnectionState : NSInteger { CONNECTED }; +// enum SearchState : NSInteger { WAITING, SEARCHING diff --git a/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard b/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard index 8531b3aa55e5..8e031e83a7eb 100644 --- a/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard +++ b/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard @@ -607,7 +607,7 @@ <image name="add.png" width="30" height="30"/> <image name="buttonBackground.png" width="45" height="45"/> <image name="ic_launcher.png" width="16" height="16"/> - <image name="more_icon.png" width="60" height="60"/> + <image name="more_icon.png" width="30" height="30"/> <image name="pointer.png" width="143" height="147"/> <image name="pointer_pushed.png" width="143" height="147"/> <image name="pushed_next_button.png" width="315" height="220"/> diff --git a/ios/iosremote/iosremote/en.lproj/iPhone_autoSize_old.storyboard b/ios/iosremote/iosremote/en.lproj/iPhone_autoSize_old.storyboard index 8531b3aa55e5..8e031e83a7eb 100644 --- a/ios/iosremote/iosremote/en.lproj/iPhone_autoSize_old.storyboard +++ b/ios/iosremote/iosremote/en.lproj/iPhone_autoSize_old.storyboard @@ -607,7 +607,7 @@ <image name="add.png" width="30" height="30"/> <image name="buttonBackground.png" width="45" height="45"/> <image name="ic_launcher.png" width="16" height="16"/> - <image name="more_icon.png" width="60" height="60"/> + <image name="more_icon.png" width="30" height="30"/> <image name="pointer.png" width="143" height="147"/> <image name="pointer_pushed.png" width="143" height="147"/> <image name="pushed_next_button.png" width="315" height="220"/> diff --git a/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize.storyboard b/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize.storyboard index df7e1a0e05f2..20ab7aaa8950 100644 --- a/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize.storyboard +++ b/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize.storyboard @@ -609,7 +609,7 @@ Contrôle Distant</string> <image name="add.png" width="30" height="30"/> <image name="buttonBackground.png" width="45" height="45"/> <image name="ic_launcher.png" width="16" height="16"/> - <image name="more_icon.png" width="60" height="60"/> + <image name="more_icon.png" width="30" height="30"/> <image name="pointer.png" width="143" height="147"/> <image name="pointer_pushed.png" width="143" height="147"/> <image name="pushed_next_button.png" width="315" height="220"/> diff --git a/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize_old.storyboard b/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize_old.storyboard index df7e1a0e05f2..20ab7aaa8950 100644 --- a/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize_old.storyboard +++ b/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize_old.storyboard @@ -609,7 +609,7 @@ Contrôle Distant</string> <image name="add.png" width="30" height="30"/> <image name="buttonBackground.png" width="45" height="45"/> <image name="ic_launcher.png" width="16" height="16"/> - <image name="more_icon.png" width="60" height="60"/> + <image name="more_icon.png" width="30" height="30"/> <image name="pointer.png" width="143" height="147"/> <image name="pointer_pushed.png" width="143" height="147"/> <image name="pushed_next_button.png" width="315" height="220"/> diff --git a/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize.storyboard b/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize.storyboard index c9b496ba10b1..2dd03bb8d56b 100644 --- a/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize.storyboard +++ b/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize.storyboard @@ -607,7 +607,7 @@ <image name="add.png" width="30" height="30"/> <image name="buttonBackground.png" width="45" height="45"/> <image name="ic_launcher.png" width="16" height="16"/> - <image name="more_icon.png" width="60" height="60"/> + <image name="more_icon.png" width="30" height="30"/> <image name="pointer.png" width="143" height="147"/> <image name="pointer_pushed.png" width="143" height="147"/> <image name="pushed_next_button.png" width="315" height="220"/> 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 c9b496ba10b1..2dd03bb8d56b 100644 --- a/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize_old.storyboard +++ b/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize_old.storyboard @@ -607,7 +607,7 @@ <image name="add.png" width="30" height="30"/> <image name="buttonBackground.png" width="45" height="45"/> <image name="ic_launcher.png" width="16" height="16"/> - <image name="more_icon.png" width="60" height="60"/> + <image name="more_icon.png" width="30" height="30"/> <image name="pointer.png" width="143" height="147"/> <image name="pointer_pushed.png" width="143" height="147"/> <image name="pushed_next_button.png" width="315" height="220"/> |