comparison ios/dw.m @ 2449:6edaa9382046

iOS: Fix scrolling the scrollbox. Make sure scrolling is enabled and set the content size on the UIScrollView after we calculate the size.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 10 Apr 2021 00:34:34 +0000
parents 7e1828dd4fe0
children 2c03987c95bd
comparison
equal deleted inserted replaced
2448:7e1828dd4fe0 2449:6edaa9382046
2871 } 2871 }
2872 if(frame.size.height < thisbox->minheight) 2872 if(frame.size.height < thisbox->minheight)
2873 { 2873 {
2874 frame.size.height = thisbox->minheight; 2874 frame.size.height = thisbox->minheight;
2875 } 2875 }
2876 [scrollbox setContentSize:frame.size];
2876 [contentbox setFrame:frame]; 2877 [contentbox setFrame:frame];
2877 2878
2878 /* Layout the content of the scrollbox */ 2879 /* Layout the content of the scrollbox */
2879 _dw_do_resize(thisbox, frame.size.width, frame.size.height); 2880 _dw_do_resize(thisbox, frame.size.width, frame.size.height);
2880 _dw_handle_resize_events(thisbox); 2881 _dw_handle_resize_events(thisbox);
3341 DWBox *box = dw_box_new(type, pad); 3342 DWBox *box = dw_box_new(type, pad);
3342 DWBox *tmpbox = dw_box_new(DW_VERT, 0); 3343 DWBox *tmpbox = dw_box_new(DW_VERT, 0);
3343 dw_box_pack_start(tmpbox, box, 1, 1, TRUE, TRUE, 0); 3344 dw_box_pack_start(tmpbox, box, 1, 1, TRUE, TRUE, 0);
3344 [scrollbox setBox:box]; 3345 [scrollbox setBox:box];
3345 [scrollbox addSubview:tmpbox]; 3346 [scrollbox addSubview:tmpbox];
3347 [scrollbox setScrollEnabled:YES];
3346 [tmpbox autorelease]; 3348 [tmpbox autorelease];
3347 DW_FUNCTION_RETURN_THIS(scrollbox); 3349 DW_FUNCTION_RETURN_THIS(scrollbox);
3348 } 3350 }
3349 3351
3350 /* 3352 /*