Skip to content

Commit

Permalink
Bugfix FXIOS-8456 [v124] Fix for retain cycle between UI kit referenc…
Browse files Browse the repository at this point in the history
…es in SecondaryButton (#18751)
  • Loading branch information
amanjeetsingh150 authored Feb 19, 2024
1 parent e05b407 commit 97d0973
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,17 @@ public class SecondaryRoundedButton: ResizableButton, ThemeApplicable {
}
updatedConfiguration.baseForegroundColor = foregroundColor

updatedConfiguration.titleTextAttributesTransformer = UIConfigurationTextAttributesTransformer { incoming in
let transformer = UIConfigurationTextAttributesTransformer { [weak foregroundColor] incoming in
var container = incoming

container.foregroundColor = updatedConfiguration.baseForegroundColor
container.foregroundColor = foregroundColor
container.font = DefaultDynamicFontHelper.preferredBoldFont(
withTextStyle: .callout,
size: UX.buttonFontSize
)
return container
}
updatedConfiguration.titleTextAttributesTransformer = transformer

configuration = updatedConfiguration
}
Expand Down

0 comments on commit 97d0973

Please sign in to comment.