uidatepicker

Avoid UIDatePicker transparency in iOS7

老子叫甜甜 提交于 2019-12-03 12:21:27
问题 i just upgraded my app to iOS7 and found that date picker is transparent. It looks like I can see everything which is behind the date picker. How can I avoid this? I tried to place date picker in another view. But still, its transparent. How can I avoid transparency of UIDatePicker ? I've tried this link 1: can I change the font color of the datePicker in iOS7? but it didn't work. Thanks in advance. Edit : I've added a UIDatePicker to a view named whiteborderview . whiteborderview

iOS9: UIDatePicker with datePickerMode of UIDatePickerModeTime only shows Hours, and no Minutes

限于喜欢 提交于 2019-12-03 12:05:22
I'm using Xcode beta 7 with the iOS9 simulator. Using a UIDatePicker with a datePickerMode of UIDatePickerModeTime only shows Hours, and not minutes. See screenshot: On iOS 7 and 8, obviously it works as expected, and shows both Hours and Minutes. Screenshot: I really do not want to reinvent the wheel and roll my own time picker. Any ideas on why this might be happening and how to fix? I can't find anything on google. thanks, Alex Found a useful description of this problem in the iOS 9 release notes - seems I should be reading these more carefully. UIPickerView and UIDatePicker are now

UIPickerView disable row selection

天大地大妈咪最大 提交于 2019-12-03 09:20:52
问题 I want to disable the selection of certain rows in my UIPickerView . Like in the Coundown timer, where you try to choose 0, it doesn't let you and slips back up to 1. Or how you can limit the date in the Date Picker ... How do a disable rows in a UIPickerView ? 回答1: In UIPickerView delegate method - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component you can check if this selection is valid and scroll to the appropriate row if it is not

Disable Past Date in UIDatePicker in IPhone Objective C

。_饼干妹妹 提交于 2019-12-03 09:20:32
I am new to Objective C and IPhone development. I am using a UIDatePicker in my IPhone Application and my requirement is to allow the user to choose the future date only from the DatePicker. To do this i want to disable past date & time in DatePicker only instead of putting a compare validation in the code. Is this possible or there is an option to disable the past date in the DatePicker control itself. Did you try this [picker setMinimumDate: [NSDate date]]; Use the following line,to disable the previous dates of an UIDatePicker. [picker setMinimumDate: [NSDate date]]; The current date is

UIDatePicker issue in iOS9

放肆的年华 提交于 2019-12-03 06:19:13
问题 Date is hiding in UIDatePicker in iOS9. i am using xib. This issue is only in xoode7(iOS9) Can any one help me to solve my issue?? 回答1: I think this is problem with new font San Francisco (the font is big than Helvetica ) and .xib file. It can be hacked around by changing the UIDatePicker mode right before it was displayed, and then changing it back to the desired one: [myDatePicker setDatePickerMode:UIDatePickerModeDateAndTime]; [myDatePicker setDatePickerMode:UIDatePickerModeDate]; Also try

UIDatePicker issues in popovers on iOS 8

人走茶凉 提交于 2019-12-03 06:11:43
Is anyone else having issues with UIDatePickers in popovers on iOS 8? Suddenly our date pickers are not showing up correctly (see screenshot). It appears that part of the picker is not being displayed (though, you can still interact with the missing portion to change the time). I did some testing, and date pickers display perfectly in other views, so it's something related to either popovers or displaying the pickers in a view that is not full screen. Has anyone found a fix or a workaround for these issues? I found a solution in the Apple Developer Forums (my backup knowledge base when Stack

Comparing an NSDate to [NSDate date]

元气小坏坏 提交于 2019-12-03 06:02:41
I am trying to force a user to select a date in the future with a date picker. I obviously used the compare: method, however, when I do the following code, even if it's the same date as [NSDate date], it tells the executes the if statement. Here is my code: if ([datePicker.date compare:[NSDate date]] == NSOrderedAscending) // If the picked date is earlier than today { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Hmm, this date is earlier than today" message:@"The date you've selected is earlier than today's date, please pick another" delegate:nil cancelButtonTitle:@"Okay, I'll

Avoid UIDatePicker transparency in iOS7

陌路散爱 提交于 2019-12-03 01:51:03
i just upgraded my app to iOS7 and found that date picker is transparent. It looks like I can see everything which is behind the date picker. How can I avoid this? I tried to place date picker in another view. But still, its transparent. How can I avoid transparency of UIDatePicker ? I've tried this link 1 : can I change the font color of the datePicker in iOS7? but it didn't work. Thanks in advance. Edit : I've added a UIDatePicker to a view named whiteborderview . whiteborderview.backgroundColor = [UIColor whiteColor]; whiteborderview.alpha = 1.0; [whiteborderview addSubview:dtPkrStart] and

UIPickerView disable row selection

喜你入骨 提交于 2019-12-02 23:39:29
I want to disable the selection of certain rows in my UIPickerView . Like in the Coundown timer, where you try to choose 0, it doesn't let you and slips back up to 1. Or how you can limit the date in the Date Picker ... How do a disable rows in a UIPickerView ? Vladimir In UIPickerView delegate method - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component you can check if this selection is valid and scroll to the appropriate row if it is not (using pickerview's - (void)selectRow:(NSInteger)row inComponent:(NSInteger)component animated:(BOOL

How to check if date (from date picker) is between two other dates ? objective-c

若如初见. 提交于 2019-12-02 21:38:56
问题 i'm trying to get date from UIDatePicker (MM-dd format) and to check if its in the range of two other dates; i have tried it in so many different ways and i think my mind has gone to far :) can someone help me do it as simple as it should be? this is my last try code: NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat:@"MM-dd"]; NSString *theDate = [dateFormat stringFromDate:birthdateSelector.date]; NSDate *birthdate = [dateFormat dateFromString:theDate];