Skip to content

Commit

Permalink
fix(ios): hideShadow handling for iOS 13 (#11240)
Browse files Browse the repository at this point in the history
Fixes TIMOB-27413
  • Loading branch information
vijaysingh-axway authored and sgtcoolguy committed Oct 2, 2019
1 parent 3a42ee4 commit c6a4ba7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions iphone/TitaniumKit/TitaniumKit/Sources/Modules/TiUIWindowProxy.m
Original file line number Diff line number Diff line change
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 c6a4ba7

Please sign in to comment.