# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1621888325 0 # Node ID 461006160d1100cf35217560946bbb7a72ff6be8 # Parent da058319f71736af574c0b6df2dbe0214e206f07 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? diff -r da058319f717 -r 461006160d11 ios/dw.m --- 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); }