Giter VIP home page Giter VIP logo

Comments (6)

asafkorem avatar asafkorem commented on September 22, 2024 1

Thanks for the patch suggestion @phuongwd, I will check that now 🙂

from react-native-navigation.

asafkorem avatar asafkorem commented on September 22, 2024 1

The fix will be released in the next patch version. @phuongwd you will both get credit in the release notes 😄

from react-native-navigation.

phuongwd avatar phuongwd commented on September 22, 2024

Related to

  1. #7506
  2. #7827

Patch

diff --git a/node_modules/react-native-navigation/lib/ios/RNNTabBarItemCreator.m b/node_modules/react-native-navigation/lib/ios/RNNTabBarItemCreator.m
index d313bfc..c22f984 100644
--- a/node_modules/react-native-navigation/lib/ios/RNNTabBarItemCreator.m
+++ b/node_modules/react-native-navigation/lib/ios/RNNTabBarItemCreator.m
@@ -91,13 +91,19 @@
     NSNumber *fontSize = [bottomTabOptions.fontSize withDefault:@(10)];
     NSString *fontWeight = [bottomTabOptions.fontWeight withDefault:nil];
 
+    /**
+     * The title of tabbar item has been cut off in iPad 12.9 with iOS 15.4.
+     * It was mentioned at https://github.com/wix/react-native-navigation/issues/7506
+     * Hotfix: centered the text will resolve problem.
+     */
+
     NSDictionary *normalAttributes = [RNNFontAttributesCreator
         createFromDictionary:[tabItem titleTextAttributesForState:UIControlStateNormal]
                   fontFamily:fontFamily
                     fontSize:fontSize
                   fontWeight:fontWeight
                        color:textColor
-                    centered:NO];
+                    centered:TRUE];
     [self setTitleAttributes:tabItem titleAttributes:normalAttributes];
 
     NSDictionary *selectedAttributes = [RNNFontAttributesCreator
@@ -106,7 +112,7 @@
                     fontSize:fontSize
                   fontWeight:fontWeight
                        color:selectedTextColor
-                    centered:NO];
+                    centered:TRUE];
     [self setSelectedTitleAttributes:tabItem selectedTitleAttributes:selectedAttributes];
 }

from react-native-navigation.

asafkorem avatar asafkorem commented on September 22, 2024

Fix is here: #7863, will release a patch version soon

from react-native-navigation.

phuongwd avatar phuongwd commented on September 22, 2024

Thanks for the patch suggestion @phuongwd, I will check that now 🙂

Credit to thuongtv-vn #7506 (comment)

from react-native-navigation.

asafkorem avatar asafkorem commented on September 22, 2024

Released with 7.38.4

from react-native-navigation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.