Mercurial > dwindows
changeset 2794:7ce51a7e8009
iOS: Fix tree control handling clicks on the expand/collapse button.
Since we didn't use _dw_internal_button_new() we had to add the
buttonClicked: target action to DWButton here for it to work.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 15 Jul 2022 08:15:11 +0000 |
parents | 24977a1ec6fc |
children | 5c61aba17b69 |
files | ios/dw.m |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ios/dw.m Thu Jul 14 06:22:19 2022 +0000 +++ b/ios/dw.m Fri Jul 15 08:15:11 2022 +0000 @@ -2858,6 +2858,10 @@ DWButton *arrowImageButton = [[DWButton alloc] initWithFrame:CGRectMake(0, 0, _DW_TREE_IMG_HEIGHT_WIDTH, _DW_TREE_IMG_HEIGHT_WIDTH)]; + [arrowImageButton addTarget:arrowImageButton + action:@selector(buttonClicked:) + forControlEvents:UIControlEventTouchUpInside]; + [arrowImageButton setType:_DW_BUTTON_TYPE_TREE]; [arrowImageButton setDidCheckedChanged:^(BOOL checked) { _expanded = checked;