Skip to content

Commit

Permalink
fix(ios): hideShadow handling for iOS 13 (#11239)
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaysingh-axway authored and ssekhri committed Sep 27, 2019
1 parent 1c07f0a commit 3b925d3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions iphone/TitaniumKit/TitaniumKit/Sources/Modules/TiUIWindowProxy.m
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3b925d3

Please sign in to comment.