Skip to content

Commit 5a9a517

Browse files
Mee-guminggo
authored andcommitted
fix text wrong warp issue (#20225)
1 parent 3712166 commit 5a9a517

File tree

10 files changed

+58
-0
lines changed

10 files changed

+58
-0
lines changed

templates/cpp-template-default/proj.ios_mac/ios/AppController.mm

+6
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
7373

7474
[[UIApplication sharedApplication] setStatusBarHidden:true];
7575

76+
//Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior.
77+
if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f)
78+
{
79+
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"];
80+
}
81+
7682
// IMPORTANT: Setting the GLView should be done after creating the RootViewController
7783
cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView((__bridge void *)_viewController.view);
7884
cocos2d::Director::getInstance()->setOpenGLView(glview);

templates/js-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm

+6
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
7373

7474
[[UIApplication sharedApplication] setStatusBarHidden:true];
7575

76+
//Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior.
77+
if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f)
78+
{
79+
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"];
80+
}
81+
7682
// IMPORTANT: Setting the GLView should be done after creating the RootViewController
7783
cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView((__bridge void *)_viewController.view);
7884
cocos2d::Director::getInstance()->setOpenGLView(glview);

templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm

+6
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
7272
[window makeKeyAndVisible];
7373

7474
[[UIApplication sharedApplication] setStatusBarHidden:true];
75+
76+
//Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior.
77+
if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f)
78+
{
79+
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"];
80+
}
7581

7682
// IMPORTANT: Setting the GLView should be done after creating the RootViewController
7783
cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView((__bridge void *)_viewController.view);

tests/cpp-empty-test/proj.ios/AppController.mm

+6
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
7878

7979
[[UIApplication sharedApplication] setStatusBarHidden: YES];
8080

81+
//Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior.
82+
if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f)
83+
{
84+
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"];
85+
}
86+
8187
// IMPORTANT: Setting the GLView should be done after creating the RootViewController
8288
cocos2d::GLViewImpl *glview = cocos2d::GLViewImpl::createWithEAGLView(eaglView);
8389
cocos2d::Director::getInstance()->setOpenGLView(glview);

tests/game-controller-test/proj.ios/AppController.mm

+6
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
7676
[[UIApplication sharedApplication] setStatusBarHidden: YES];
7777
#endif
7878

79+
//Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior.
80+
if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f)
81+
{
82+
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"];
83+
}
84+
7985
// IMPORTANT: Setting the GLView should be done after creating the RootViewController
8086
cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView(eaglView);
8187
cocos2d::Director::getInstance()->setOpenGLView(glview);

tests/js-tests/project/proj.ios/AppController.mm

+5
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
8282
#if !defined(CC_TARGET_OS_TVOS)
8383
[[UIApplication sharedApplication] setStatusBarHidden: YES];
8484
#endif
85+
//Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior.
86+
if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f)
87+
{
88+
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"];
89+
}
8590

8691
// IMPORTANT: Setting the GLView should be done after creating the RootViewController
8792
cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView(eaglView);

tests/lua-empty-test/project/proj.ios/AppController.mm

+6
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
7676

7777
[[UIApplication sharedApplication] setStatusBarHidden: YES];
7878

79+
//Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior.
80+
if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f)
81+
{
82+
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"];
83+
}
84+
7985
// IMPORTANT: Setting the GLView should be done after creating the RootViewController
8086
cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView(eaglView);
8187
cocos2d::Director::getInstance()->setOpenGLView(glview);

tests/lua-game-controller-test/project/proj.ios/AppController.mm

+6
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
7373

7474
[[UIApplication sharedApplication] setStatusBarHidden: YES];
7575

76+
//Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior.
77+
if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f)
78+
{
79+
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"];
80+
}
81+
7682
// IMPORTANT: Setting the GLView should be done after creating the RootViewController
7783
cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView(eaglView);
7884
cocos2d::Director::getInstance()->setOpenGLView(glview);

tests/lua-tests/project/proj.ios_mac/ios/AppController.mm

+5
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
8484
[[UIApplication sharedApplication] setStatusBarHidden: YES];
8585
#endif
8686

87+
//Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior.
88+
if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f)
89+
{
90+
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"];
91+
}
8792

8893
// IMPORTANT: Setting the GLView should be done after creating the RootViewController
8994
cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView(eaglView);

tests/performance-tests/proj.ios/AppController.mm

+6
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
8181

8282
[[UIApplication sharedApplication] setStatusBarHidden:true];
8383

84+
//Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior.
85+
if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f)
86+
{
87+
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"];
88+
}
89+
8490
// IMPORTANT: Setting the GLView should be done after creating the RootViewController
8591
cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView(eaglView);
8692
cocos2d::Director::getInstance()->setOpenGLView(glview);

0 commit comments

Comments
 (0)