From 0916345c824755848ee0df1f2f18e87138d8aa83 Mon Sep 17 00:00:00 2001 From: Alex Maimescu Date: Thu, 18 May 2017 15:01:54 +0300 Subject: [PATCH] Fix a typo in the property name. --- AMXFontAutoScale/AMXFontAutoScalable.h | 4 ++-- AMXFontAutoScale/UILabel+AMXFontScale.m | 24 +++++++++++----------- AMXFontAutoScale/UITextView+AMXFontScale.m | 24 +++++++++++----------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/AMXFontAutoScale/AMXFontAutoScalable.h b/AMXFontAutoScale/AMXFontAutoScalable.h index 2dd2512..4225ac6 100644 --- a/AMXFontAutoScale/AMXFontAutoScalable.h +++ b/AMXFontAutoScale/AMXFontAutoScalable.h @@ -22,8 +22,8 @@ typedef NS_ENUM(NSInteger, AMXScreenSize) { @protocol AMXFontAutoScalable -@property (nonatomic, assign, setter=set_amx_autoScaleEndabled:) BOOL amx_autoScaleEndabled; -@property (nonatomic, class, setter=set_amx_autoScaleEndabled:) BOOL amx_autoScaleEndabled; +@property (nonatomic, class, setter=set_amx_autoScaleEnabled:) BOOL amx_autoScaleEnabled; +@property (nonatomic, assign, setter=set_amx_autoScaleEnabled:) BOOL amx_autoScaleEnabled; @property (nonatomic, assign, setter=set_amx_referenceScreenSize:) AMXScreenSize amx_referenceScreenSize; @property (nonatomic, class, setter=set_amx_referenceScreenSize:) AMXScreenSize amx_referenceScreenSize; diff --git a/AMXFontAutoScale/UILabel+AMXFontScale.m b/AMXFontAutoScale/UILabel+AMXFontScale.m index a18c635..786b4fc 100644 --- a/AMXFontAutoScale/UILabel+AMXFontScale.m +++ b/AMXFontAutoScale/UILabel+AMXFontScale.m @@ -19,18 +19,18 @@ @implementation UILabel (AMXFontScale) + (void)amx_autoScaleFontForReferenceScreenSize:(AMXScreenSize)screenSize { - [self set_amx_autoScaleEndabled:YES]; + [self set_amx_autoScaleEnabled:YES]; [self set_amx_referenceScreenSize:screenSize]; } -+ (BOOL)amx_autoScaleEndabled ++ (BOOL)amx_autoScaleEnabled { return s_globalAutoScaleEnabled; } -+ (void)set_amx_autoScaleEndabled:(BOOL)amx_autoScaleEndabled ++ (void)set_amx_autoScaleEnabled:(BOOL)amx_autoScaleEnabled { - s_globalAutoScaleEnabled = amx_autoScaleEndabled; + s_globalAutoScaleEnabled = amx_autoScaleEnabled; } + (AMXScreenSize)amx_referenceScreenSize @@ -47,18 +47,18 @@ + (void)set_amx_referenceScreenSize:(AMXScreenSize)amx_referenceScreenSize - (void)amx_autoScaleFontForReferenceScreenSize:(AMXScreenSize)screenSize { - self.amx_autoScaleEndabled = YES; + self.amx_autoScaleEnabled = YES; self.amx_referenceScreenSize = screenSize; } -- (BOOL)amx_autoScaleEndabled +- (BOOL)amx_autoScaleEnabled { - return [[self amx_getObjectForKey:@selector(amx_autoScaleEndabled)] boolValue]; + return [[self amx_getObjectForKey:@selector(amx_autoScaleEnabled)] boolValue]; } -- (void)set_amx_autoScaleEndabled:(BOOL)amx_autoScaleEndabled +- (void)set_amx_autoScaleEnabled:(BOOL)amx_autoScaleEnabled { - [self amx_storeObject:@(amx_autoScaleEndabled) forKey:@selector(amx_autoScaleEndabled)]; + [self amx_storeObject:@(amx_autoScaleEnabled) forKey:@selector(amx_autoScaleEnabled)]; } - (AMXScreenSize)amx_referenceScreenSize @@ -73,7 +73,7 @@ - (void)set_amx_referenceScreenSize:(AMXScreenSize)amx_referenceScreenSize - (BOOL)wasInstanceAutoScaleSet { - return [self amx_getObjectForKey:@selector(amx_autoScaleEndabled)] != nil; + return [self amx_getObjectForKey:@selector(amx_autoScaleEnabled)] != nil; } #pragma mark - Swizzles @@ -87,9 +87,9 @@ + (void)load - (void)swizzle_willMoveToWindow:(UIWindow *)newWindow { AMXScreenSize referenceScreenSize = AMXScreenSizeCurrent; - if (self.amx_autoScaleEndabled) { + if (self.amx_autoScaleEnabled) { referenceScreenSize = self.amx_referenceScreenSize; - } else if (self.class.amx_autoScaleEndabled && ![self wasInstanceAutoScaleSet]) { + } else if (self.class.amx_autoScaleEnabled && ![self wasInstanceAutoScaleSet]) { referenceScreenSize = self.class.amx_referenceScreenSize; } diff --git a/AMXFontAutoScale/UITextView+AMXFontScale.m b/AMXFontAutoScale/UITextView+AMXFontScale.m index be313ee..18da278 100644 --- a/AMXFontAutoScale/UITextView+AMXFontScale.m +++ b/AMXFontAutoScale/UITextView+AMXFontScale.m @@ -19,18 +19,18 @@ @implementation UITextView (AMXFontScale) + (void)amx_autoScaleFontForReferenceScreenSize:(AMXScreenSize)screenSize { - [self set_amx_autoScaleEndabled:YES]; + [self set_amx_autoScaleEnabled:YES]; [self set_amx_referenceScreenSize:screenSize]; } -+ (BOOL)amx_autoScaleEndabled ++ (BOOL)amx_autoScaleEnabled { return s_globalAutoScaleEnabled; } -+ (void)set_amx_autoScaleEndabled:(BOOL)amx_autoScaleEndabled ++ (void)set_amx_autoScaleEnabled:(BOOL)amx_autoScaleEnabled { - s_globalAutoScaleEnabled = amx_autoScaleEndabled; + s_globalAutoScaleEnabled = amx_autoScaleEnabled; } + (AMXScreenSize)amx_referenceScreenSize @@ -47,18 +47,18 @@ + (void)set_amx_referenceScreenSize:(AMXScreenSize)amx_referenceScreenSize - (void)amx_autoScaleFontForReferenceScreenSize:(AMXScreenSize)screenSize { - self.amx_autoScaleEndabled = YES; + self.amx_autoScaleEnabled = YES; self.amx_referenceScreenSize = screenSize; } -- (BOOL)amx_autoScaleEndabled +- (BOOL)amx_autoScaleEnabled { - return [[self amx_getObjectForKey:@selector(amx_autoScaleEndabled)] boolValue]; + return [[self amx_getObjectForKey:@selector(amx_autoScaleEnabled)] boolValue]; } -- (void)set_amx_autoScaleEndabled:(BOOL)amx_autoScaleEndabled +- (void)set_amx_autoScaleEnabled:(BOOL)amx_autoScaleEnabled { - [self amx_storeObject:@(amx_autoScaleEndabled) forKey:@selector(amx_autoScaleEndabled)]; + [self amx_storeObject:@(amx_autoScaleEnabled) forKey:@selector(amx_autoScaleEnabled)]; } - (AMXScreenSize)amx_referenceScreenSize @@ -73,7 +73,7 @@ - (void)set_amx_referenceScreenSize:(AMXScreenSize)amx_referenceScreenSize - (BOOL)wasInstanceAutoScaleSet { - return [self amx_getObjectForKey:@selector(amx_autoScaleEndabled)] != nil; + return [self amx_getObjectForKey:@selector(amx_autoScaleEnabled)] != nil; } #pragma mark - Swizzles @@ -87,9 +87,9 @@ + (void)load - (void)swizzle_willMoveToWindow:(UIWindow *)newWindow { AMXScreenSize referenceScreenSize = AMXScreenSizeCurrent; - if (self.amx_autoScaleEndabled) { + if (self.amx_autoScaleEnabled) { referenceScreenSize = self.amx_referenceScreenSize; - } else if (self.class.amx_autoScaleEndabled && ![self wasInstanceAutoScaleSet]) { + } else if (self.class.amx_autoScaleEnabled && ![self wasInstanceAutoScaleSet]) { referenceScreenSize = self.class.amx_referenceScreenSize; }