changeset 2587:461006160d11

iOS: Reenable Calendar control, setTranslatesAutoresizingMaskIntoConstraints:NO was causing UIDatePicker to add constraints to our DWBoxes that screwed up the layout. I thought setting it to NO would do that but apparently it was the opposite?
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 24 May 2021 20:32:05 +0000
parents da058319f717
children 8253e17b20ad
files ios/dw.m
diffstat 1 files changed, 0 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ios/dw.m	Mon May 24 01:48:27 2021 +0000
+++ b/ios/dw.m	Mon May 24 20:32:05 2021 +0000
@@ -3473,7 +3473,6 @@
     DW_FUNCTION_INIT;
     DWBox *view = [[[DWBox alloc] init] retain];
     Box *newbox = [view box];
-    [view setTranslatesAutoresizingMaskIntoConstraints:NO];
     memset(newbox, 0, sizeof(Box));
     newbox->pad = pad;
     newbox->type = type;
@@ -7315,8 +7314,6 @@
 DW_FUNCTION_RETURN(dw_calendar_new, HWND)
 DW_FUNCTION_RESTORE_PARAM1(cid, ULONG)
 {
-    DWCalendar *calendar = nil;
-#if 0 /* TODO: Figure out why this corrupts DWBoxes in its hierarchy */
     DWCalendar *calendar = [[[DWCalendar alloc] init] retain];
     if (@available(iOS 14.0, *)) {
         [calendar setPreferredDatePickerStyle:UIDatePickerStyleInline];
@@ -7327,7 +7324,6 @@
     [calendar setDatePickerMode:UIDatePickerModeDate];
     [calendar setDate:[NSDate date]];
     [calendar setTag:cid];
-#endif
     DW_FUNCTION_RETURN_THIS(calendar);
 }