From c6a4ba78c83aea52877c77becc583ad4e47ba7de Mon Sep 17 00:00:00 2001 From: Vijay Vikram Singh Date: Wed, 2 Oct 2019 13:33:36 -0700 Subject: [PATCH] fix(ios): hideShadow handling for iOS 13 (#11240) Fixes TIMOB-27413 --- .../TitaniumKit/Sources/Modules/TiUIWindowProxy.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/iphone/TitaniumKit/TitaniumKit/Sources/Modules/TiUIWindowProxy.m b/iphone/TitaniumKit/TitaniumKit/Sources/Modules/TiUIWindowProxy.m index 502e9c0df05..1840eda67c3 100644 --- a/iphone/TitaniumKit/TitaniumKit/Sources/Modules/TiUIWindowProxy.m +++ b/iphone/TitaniumKit/TitaniumKit/Sources/Modules/TiUIWindowProxy.m @@ -455,11 +455,23 @@ - (void)updateBarImage if (theImage != nil) { UIImage *resizableImage = [theImage resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0) resizingMode:UIImageResizingModeStretch]; ourNB.shadowImage = resizableImage; +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 + if ([TiUtils isIOSVersionOrGreater:@"13.0"]) { + ourNB.standardAppearance.shadowImage = resizableImage; + ourNB.scrollEdgeAppearance.shadowImage = resizableImage; + } +#endif } else { BOOL clipValue = [TiUtils boolValue:[self valueForUndefinedKey:@"hideShadow"] def:NO]; if (clipValue) { //Set an empty Image. ourNB.shadowImage = [[[UIImage alloc] init] autorelease]; +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 + if ([TiUtils isIOSVersionOrGreater:@"13.0"]) { + ourNB.standardAppearance.shadowColor = nil; + ourNB.scrollEdgeAppearance.shadowColor = nil; + } +#endif } else { ourNB.shadowImage = nil; }