diff --git a/renderer/native/ios/renderer/component/view/HippyViewManager.mm b/renderer/native/ios/renderer/component/view/HippyViewManager.mm index 648a702f301..0a0621426f6 100644 --- a/renderer/native/ios/renderer/component/view/HippyViewManager.mm +++ b/renderer/native/ios/renderer/component/view/HippyViewManager.mm @@ -392,10 +392,21 @@ - (void)loadImageSource:(NSString *)path forView:(HippyView *)view { } } HIPPY_CUSTOM_VIEW_PROPERTY(borderColor, CGColor, HippyView) { + CGColorRef color = nil; if ([view respondsToSelector:@selector(setBorderColor:)]) { - view.borderColor = json ? [HippyConvert CGColor:json] : defaultView.borderColor; + if (json) { + color = [HippyConvert CGColor:json]; + } else { + color = defaultView ? defaultView.borderColor : [UIColor clearColor].CGColor; + } + view.borderColor = color; } else { - view.layer.borderColor = json ? [HippyConvert CGColor:json] : defaultView.layer.borderColor; + if (json) { + color = [HippyConvert CGColor:json]; + } else { + color = defaultView ? defaultView.layer.borderColor : [UIColor clearColor].CGColor; + } + view.layer.borderColor = color; } }