# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1617409489 0 # Node ID ccfc4ee9c4a785b31a9c48c0c59ea8ea95a73de9 # Parent 353581ebf4a5e295d36d4fef365383e6c9dd86b3 iOS: Missed a few other DWContainer fixes in that last commit. diff -r 353581ebf4a5 -r ccfc4ee9c4a7 ios/dw.m --- a/ios/dw.m Sat Apr 03 00:14:05 2021 +0000 +++ b/ios/dw.m Sat Apr 03 00:24:49 2021 +0000 @@ -4238,18 +4238,7 @@ else { UITableViewCell *cell = [cont getRow:index and:0]; - NSString *nstr; - - if(@available(iOS 14.0, *)) - { - UIListContentConfiguration *content = [cell defaultContentConfiguration]; - - nstr = [content text]; - } - else - { - nstr = [cell text]; - } + NSString *nstr = [[cell textLabel] text]; strncpy(buffer, [nstr UTF8String], length - 1); } @@ -4281,17 +4270,8 @@ { NSString *nstr = [NSString stringWithUTF8String:buffer]; UITableViewCell *cell = [cont getRow:index and:0]; - - if(@available(iOS 14.0, *)) - { - UIListContentConfiguration *content = [cell defaultContentConfiguration]; - - [content setText:nstr]; - } - else - { - [cell setText:nstr]; - } + + [[cell textLabel] setText:nstr]; [cont reloadData]; [cont setNeedsDisplay]; } @@ -5630,31 +5610,9 @@ UITableViewCell *cell = object; if(icon) - { - if(@available(iOS 14.0, *)) - { - UIListContentConfiguration *content = [cell defaultContentConfiguration]; - - [content setImage:icon]; - } - else - { - [cell setImage:icon]; - } - } + [[cell imageView] setImage:icon]; else - { - if(@available(iOS 14.0, *)) - { - UIListContentConfiguration *content = [cell defaultContentConfiguration]; - - [content setText:text]; - } - else - { - [cell setText:text]; - } - } + [[cell textLabel] setText:text]; } else /* Otherwise replace it with a new cell */ [cont editCell:_dw_table_cell_view_new(icon, text) at:(row+lastadd) and:column]; @@ -5733,31 +5691,9 @@ UITableViewCell *cell = object; if(icon) - { - if(@available(iOS 14.0, *)) - { - UIListContentConfiguration *content = [cell defaultContentConfiguration]; - - [content setImage:icon]; - } - else - { - [cell setImage:icon]; - } - } + [[cell imageView] setImage:icon]; if(text) - { - if(@available(iOS 14.0, *)) - { - UIListContentConfiguration *content = [cell defaultContentConfiguration]; - - [content setText:text]; - } - else - { - [cell setText:text]; - } - } + [[cell textLabel] setText:text]; } else /* Otherwise replace it with a new cell */ [cont editCell:_dw_table_cell_view_new(icon, text) at:(row+lastadd) and:0];