changeset 2674:dd0b29320a3d

iOS: Use the claimed default value for the navigation bar of 44 points. Then check to see if the intrinsicContentSize is different for us. It is reporting a point size of 50 for me which corrects the look. Also even more unicode in mobile.txt.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 18 Oct 2021 20:50:55 +0000
parents a39e2ea6fa14
children a7868380098f
files ios/dw.m mobile.txt
diffstat 2 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ios/dw.m	Mon Oct 18 13:29:55 2021 +0000
+++ b/ios/dw.m	Mon Oct 18 20:50:55 2021 +0000
@@ -8071,9 +8071,18 @@
         if(flStyle & DW_FCF_TITLEBAR)
         {
             NSInteger sbheight = [[[window windowScene] statusBarManager] statusBarFrame].size.height;
-            UINavigationBar* navbar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, sbheight, screenrect.size.width, 40)];
+            CGRect navrect = CGRectMake(0, sbheight, screenrect.size.width, 44);
+            UINavigationBar* navbar = [[UINavigationBar alloc] initWithFrame:navrect];
             UINavigationItem* navItem = [[UINavigationItem alloc] initWithTitle:nstitle];
 
+            /* Double check the intrinsic height... */
+            CGSize navdefault = [navbar intrinsicContentSize];
+            if(navdefault.height != navrect.size.height)
+            {
+                navrect.size.height = navdefault.height;
+                navbar.frame = navrect;
+            }
+
             /* We maintain a list of top-level windows...If there is more than one window,
              * and our window has the close button style, add a Back button that will close it.
              */
--- a/mobile.txt	Mon Oct 18 13:29:55 2021 +0000
+++ b/mobile.txt	Mon Oct 18 20:50:55 2021 +0000
@@ -26,12 +26,12 @@
 	"Product name" with "dwindows" uncheck "Include Tests"
 9. Delete the created "dwindows.h" and "Move to Trash"
 10. Select "dwindows" folder and File -> Add Files to "Dynamic Windows iOS"...
-	Add "dw.h" and "ios/dw.n" with "Copy items if needed" unchecked.
+	Add "dw.h" and "ios/dw.m" with "Copy items if needed" unchecked.
 11. Repeat steps 8 through 10 with "dwcompat" adding the dwcompat.c and dwcompat.h files.
 12. Highlight the project "Dynamic Windows iOS" in the top left then select the main project.
-	Click "Build Settings" for the entire project and find "Apple Clang – Preprocessing" 
+	Click "Build Settings" for the entire project and find "Apple Clang - Preprocessing" 
 	Double click "Preprocessor Macros" and add "__IOS__" to the list for release and debug.
-13. Set "Objective-C Automatic Reference Counting" to  "No" in "Language – Objective-C"
+13. Set "Objective-C Automatic Reference Counting" to  "No" in "Language - Objective-C"
 14. Edit the "Info.plist" in "dwtest" and remove all the settings below "Bundle version"
 	This is required because Dynamic Windows does not use storyboards.
 	If necessary edit the "dwtest" "Build Settings" and correct the path to "dwtest/Info.plist"