changeset 2417:ccfc4ee9c4a7

iOS: Missed a few other DWContainer fixes in that last commit.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 03 Apr 2021 00:24:49 +0000
parents 353581ebf4a5
children 50e1ddce0aeb
files ios/dw.m
diffstat 1 files changed, 7 insertions(+), 71 deletions(-) [+]
line wrap: on
line diff
--- 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];