[ThumbTrack] Migrated to MDFi18n
MODIFY
MaterialComponents.podspec
MaterialComponents.podspec
@@ -551,8 +551,8 @@ Pod::Spec.new do |s|
ss.dependency "MaterialComponents/ShadowLayer"
ss.dependency "MaterialComponents/Typography"
+ ss.dependency "MDFInternationalization"
ss.dependency "MaterialComponents/private/Math"
- ss.dependency "MaterialComponents/private/RTL"
end
pss.subspec "UIMetrics" do |ss|

MODIFY
components/private/ThumbTrack/src/MDCThumbTrack.m
components/private/ThumbTrack/src/MDCThumbTrack.m
#import "MDCNumericValueLabel.h"
#import "MDCThumbView.h"
+#import "MDFInternationalization.h"
#import "MaterialInk.h"
#import "MaterialMath.h"
-#import "MaterialRTL.h"
static const CGFloat kAnimationDuration = 0.25f;
static const CGFloat kThumbChangeAnimationDuration = 0.12f;
@@ -824,7 +824,7 @@ static inline CGFloat DistanceFromPointToPoint(CGPoint point1, CGPoint point2) {
CGFloat relValue = (position.x - _thumbRadius) / self.thumbPanRange;
relValue = MAX(0, MIN(relValue, 1));
// For RTL we invert the value
- if (self.mdc_effectiveUserInterfaceLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft) {
+ if (self.mdf_effectiveUserInterfaceLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft) {
relValue = 1 - relValue;
}
return (1 - relValue) * _minimumValue + relValue * _maximumValue;
@@ -868,7 +868,7 @@ static inline CGFloat DistanceFromPointToPoint(CGPoint point1, CGPoint point2) {
}
CGFloat relValue = (value - _minimumValue) / MDCFabs(_minimumValue - _maximumValue);
// For RTL we invert the value
- if (self.mdc_effectiveUserInterfaceLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft) {
+ if (self.mdf_effectiveUserInterfaceLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft) {
relValue = 1 - relValue;
}
return relValue;

[ThumbTrack] Migrated to MDFi18n (#2284)