From d517214dd4c16ad4ed65005183bbefedd5048fcf Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Wed, 26 Sep 2018 13:10:09 -0700 Subject: [PATCH] Fabric: Fixed missing text on some views with borders Summary: Apparently, after updating CALayer props we have to request redrowing on top of it manually. Reviewed By: mdvacca Differential Revision: D10053340 fbshipit-source-id: f87311399bab809c9e13a3076f526bbe3f7f3fb4 --- .../Mounting/ComponentViews/View/RCTViewComponentView.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm index 550e635ec..f2ae9bac1 100644 --- a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm @@ -420,6 +420,10 @@ static RCTBorderStyle RCTBorderStyleFromBorderStyle(BorderStyle borderStyle) { layer.cornerRadius = cornerRadius; layer.mask = maskLayer; } + + // After updating `layer`'s parameters we have to redraw on top of it + // all custom content (calling `drawRect:` implemented in subclasses). + [layer setNeedsDisplay]; } #pragma mark - Accessibility