[Tabs] Migrated to MDFi18n
MODIFY
MaterialComponents.podspec
MaterialComponents.podspec
@@ -431,13 +431,13 @@ Pod::Spec.new do |s|
sss.source_files = "components/#{ss.base_name}/src/*.{h,m}", "components/#{ss.base_name}/src/private/*.{h,m}"
sss.resources = ["components/#{ss.base_name}/src/Material#{ss.base_name}.bundle"]
+ sss.dependency "MDFInternationalization"
sss.dependency "MaterialComponents/AnimationTiming"
sss.dependency "MaterialComponents/Ink"
sss.dependency "MaterialComponents/ShadowElevations"
sss.dependency "MaterialComponents/ShadowLayer"
sss.dependency "MaterialComponents/Typography"
sss.dependency "MaterialComponents/private/Math"
- sss.dependency "MaterialComponents/private/RTL"
end
ss.subspec "ColorThemer" do |sss|
sss.ios.deployment_target = '8.0'

MODIFY
components/Tabs/src/private/MDCItemBar.m
components/Tabs/src/private/MDCItemBar.m
#import "MDCItemBarCell.h"
#import "MDCItemBarStyle.h"
+#import "MDFInternationalization.h"
#import "MaterialAnimationTiming.h"
-#import "MaterialRTL.h"
/// Height in points of the bar shown under selected items.
static const CGFloat kSelectionIndicatorHeight = 2.0f;
@@ -832,8 +832,7 @@ static void *kItemPropertyContext = &kItemPropertyContext;
// Must call super here to ensure we have the original collection bounds.
CGRect collectionBounds = {CGPointZero, [super collectionViewContentSize]};
- newAttributes.frame = MDCRectFlippedForRTL(itemFrame, CGRectGetWidth(collectionBounds),
- UIUserInterfaceLayoutDirectionRightToLeft);
+ newAttributes.frame = MDFRectFlippedHorizontally(itemFrame, CGRectGetWidth(collectionBounds));
return newAttributes;
}
@@ -846,7 +845,7 @@ static void *kItemPropertyContext = &kItemPropertyContext;
NSProcessInfo *processInfo = [NSProcessInfo processInfo];
if ([processInfo respondsToSelector:@selector(isOperatingSystemAtLeastVersion:)] &&
[processInfo isOperatingSystemAtLeastVersion:iOS9Version]) {
- if (self.collectionView.mdc_effectiveUserInterfaceLayoutDirection ==
+ if (self.collectionView.mdf_effectiveUserInterfaceLayoutDirection ==
UIUserInterfaceLayoutDirectionRightToLeft) {
enforceRTL = YES;
}

MODIFY
components/Tabs/src/private/MDCItemBarCell.m
components/Tabs/src/private/MDCItemBarCell.m
#import "MDCItemBarStringConstants.h"
#import "MDCItemBarStyle.h"
+#import "MDFInternationalization.h"
#import "MaterialAnimationTiming.h"
#import "MaterialInk.h"
#import "MaterialMath.h"
-#import "MaterialRTL.h"
#import "MaterialTypography.h"
/// Size of image in points.
@@ -245,7 +245,7 @@ static const NSTimeInterval kSelectionAnimationDuration = 0.3f;
if (_style.shouldDisplayBadge) {
CGFloat badgeOffset = (imageBounds.size.width / 2) + (badgeSize.width / 2);
- if (self.mdc_effectiveUserInterfaceLayoutDirection ==
+ if (self.mdf_effectiveUserInterfaceLayoutDirection ==
UIUserInterfaceLayoutDirectionRightToLeft) {
badgeOffset *= -1;
}

[Tabs] Migrated to MDFi18n (#2282)