Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 0ccf36b

Browse files
committed
[[ Bug 23130 ]] Ensure the pick wheel is shown on iOS 14 on iPhone
This patch ensures mobilePickDate shows the pick wheel on iOS 14 on the iPhone
1 parent bb28970 commit 0ccf36b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

engine/src/mbliphonepickdate.mm

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,12 @@ - (void) startDatePicker:(NSString *)p_style andCurrent: (int32_t)r_current andS
251251
[datePicker setLocale:t_locale];
252252
[datePicker setCalendar:[t_locale objectForKey:NSLocaleCalendar]];
253253
[datePicker setTimeZone:[NSTimeZone localTimeZone]];
254-
255-
256-
254+
#ifdef __IPHONE_14_0
255+
if (@available(iOS 14, *))
256+
{
257+
[datePicker setPreferredDatePickerStyle: UIDatePickerStyleWheels];
258+
}
259+
#endif
257260
// PM-2014-10-22: [[ Bug 13750 ]] Make sure the view under the pickerView is not visible (iphone 4 only)
258261
NSString *t_device_model_name = MCIPhoneGetDeviceModelName();
259262
if ([t_device_model_name isEqualToString:@"iPhone 4"] || [t_device_model_name isEqualToString:@"iPhone 4(Rev A)"] || [t_device_model_name isEqualToString:@"iPhone 4(CDMA)"])

0 commit comments

Comments
 (0)